From 0782e70445e9e9fb7becf4697674a5182558826c Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Sun, 23 Feb 2025 14:28:35 +0800 Subject: [PATCH 1/2] fix: some error --- manual/extension/metadata-server.md | 89 ------------------------- manual/repo/docker/md-server.yml | 48 ------------- manual/repo/docker/pro/env | 2 +- manual/setup/use_other_reverse_proxy.md | 2 +- 4 files changed, 2 insertions(+), 139 deletions(-) delete mode 100644 manual/extension/metadata-server.md delete mode 100644 manual/repo/docker/md-server.yml diff --git a/manual/extension/metadata-server.md b/manual/extension/metadata-server.md deleted file mode 100644 index 89e69907..00000000 --- a/manual/extension/metadata-server.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -status: new ---- - -# Metadata server - -Metadata server aims to provide metadata management for your libraries, so as to better understand the relevant information of your libraries. - -## Deployment - -!!! note "Prerequisites" - The startup of Metadata server **requires the use of *Redis* service**, but Seafile server uses *Memcached* as the cache server by default, so you must [deploy ***Redis*** for Seafile](../config/seafile-conf.md#cache-pro-edition-only) before using Metadata server, or use an external Redis service. - -### Download YML file - - Please download YML file **in your `seafile-server.yml` directory** by following command: - - ```sh - wget https://manual.seafile.com/12.0/repo/docker/md-server.yml - ``` - -### Modify `.env` according - -Normally, you don't need to set additional variables in `.env` for metadata server, because the default settings and necessary environment variables will be consistent with Seafile server (e.g., `JWT_PRIVATE_KEY`), and the metadata of libraries will be stored locally (default is `/opt/md-data`). By the way, you can also add or modify relevant environment variables in `.env` according to the information in the following table: - -!!! success "Faster configuration" - Metadata-server docker we use an one-time configuration file, which will be generated directly through the environment variable, eliminating the need for you to repeatedly write configuration files (i.e., **no `md-server.conf`**), which will significantly improve your deployment efficiency. - - -| Variables | Description | Required | -| --- | --- | --- | -| `MD_STORAGE_TYPE` | The type of backend storage. Options: `file` (local storage), `s3`, `oss`. | Optional, default `file` | -| `MD_DATA` | Directory where local data (only valid in `MD_STORAGE_TYPE=file`) and cache are located. | Optional, default `/opt/md-data` | -| `MD_MAX_CACHE_SIZE` | The maximum cache size. | Optional, default `1GB` | -| `MD_S3_HOST` | Host of s3 backend. | Optional | -| `MD_S3_AWS_REGION` | Region of *AWS* s3 backend. | Optional | -| `MD_S3_USE_HTTPS` | Use https connecting to S3 backend. | Optional, default `true` | -| `MD_S3_BUCKET` | Name of S3 bucket for storaging metadata. | **Required** | -| `MD_S3_PATH_STYLE_REQUEST` | S3 backend use path style request. | Optional, default `false` | -| `MD_S3_KEY_ID` | S3 backend authorization key ID. | **Required** | -| `MD_S3_KEY` | S3 backend authorization key secret. | **Required** | -| `MD_S3_USE_V4_SIGNATURE` | Use V4 signature to S3 storage backend. | Optional, default `true` | -| `MD_S3_SSE_C_KEY` | S3 SSE-C key. | Optional | -| `MD_OSS_HOST` | OSS backend host. | Optional | -| `MD_OSS_REGION` | OSS backend region. | Optional | -| `MD_OSS_BUCKET` | Name of OSS bucket for storaging metadata. | **Required** | -| `MD_OSS_KEY_ID` | OSS backend authorization key ID. | **Required** | -| `MD_OSS_KEY` | OSS backend authorization key secret. | **Required** | -| `REDIS_HOST` | Your *Redis* service host. | Optional, default `redis` | -| `REDIS_PORT` | Your *Redis* service port. | Optional, default `6379` | -| `REDIS_PASSWORD` | Your *Redis* access password. | Optional | - - -!!! tip "More descriptions about *Optional* and *Required* in above table" - - In the table above, although many items are marked as *Required*, some of them are only required when the storage backend specified by `MD_STORAGE_TYPE` is used: - - `MD_S3_xxx` only valid in `MD_STORAGE_TYPE=s3` - - `MD_OSS_xxx` only valid in `MD_STORAGE_TYPE=oss` - - - If `MD_STORAGE_TYPE` is `s3` or `oss`, although `MD_xxx_HOST` and `MD_xxx_REGION` are marked as ***Optional***, when you use one of these two storage backends, **you must specify at least one of `MD_xxx_HOST` and `MD_xxx_REGION`, otherwise the service will fail to start**. - -## Start service - -You can use following command to start metadata server: - -```sh -docker compose up -d -``` - -!!! success - If the container startups normally, the follow message you can get from `docker logs -f metadata-server`: - ```log - [md-server] [2025-01-24 06:23:44] [INFO] Environment variable validity checked - [md-server] [2025-01-24 06:23:44] [INFO] Database initialization completed - [md-server] [2025-01-24 06:23:44] [INFO] Configuration file generated - [md-server] [2025-01-24 06:45:17] [INFO] starting seaf-md-server - ``` - -!!! note "About listening port of Metadata server" - - By default, the Metadata server listens on port 8084. You can modify it by specifying `MD_PORT` in .env. At the same time, due to security reasons, this port is not open to the external network. If you need to open this port, you need to modify `md-server.yml` to uncomment the following: - - ```yml - services: - metadata-server: - ... - ports: - - ${MD_PORT:-8084}:${MD_PORT:-8084} - ... - ``` diff --git a/manual/repo/docker/md-server.yml b/manual/repo/docker/md-server.yml deleted file mode 100644 index 6e7b755d..00000000 --- a/manual/repo/docker/md-server.yml +++ /dev/null @@ -1,48 +0,0 @@ -services: - metadata-server: - image: ${MD_IMAGE:-seafileltd/metadata-server:latest} - container_name: metadata-server - volumes: - - ${MD_DATA:-/opt/md-data}:/data - - ${SEAFILE_VOLUME:-/opt/seafile-data}/seafile:/opt/seafile - #ports: - # - ${MD_PORT:-8084}:${MD_PORT:-8084} - environment: - - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} - - SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db} - - SEAFILE_MYSQL_DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306} - - SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile} - - SEAFILE_MYSQL_DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty} - - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db} - - SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false} - - MD_PORT=${MD_PORT:-8084} - - MD_LOG_LEVEL=${MD_LOG_LEVEL:-info} - - MD_MAX_CACHE_SIZE=${MD_MAX_CACHE_SIZE:-1GB} - - MD_STORAGE_TYPE=${MD_STORAGE_TYPE:-file} - - MD_S3_HOST=${MD_S3_HOST:-} - - MD_S3_AWS_REGION=${MD_S3_AWS_REGION:-} - - MD_S3_USE_HTTPS=${MD_S3_USE_HTTPS:-true} - - MD_S3_BUCKET=${MD_S3_BUCKET:-} - - MD_S3_PATH_STYLE_REQUEST=${MD_S3_PATH_STYLE_REQUEST:-false} - - MD_S3_KEY_ID=${MD_S3_KEY_ID:-} - - MD_S3_KEY=${MD_S3_KEY:-} - - MD_S3_USE_V4_SIGNATURE=${MD_S3_USE_V4_SIGNATURE:-true} - - MD_S3_SSE_C_KEY=${MD_S3_SSE_C_KEY:-} - - MD_OSS_HOST=${MD_OSS_HOST:-} - - MD_OSS_REGION=${MD_OSS_REGION:-} - - MD_OSS_BUCKET=${MD_OSS_BUCKET:-} - - MD_OSS_KEY_ID=${MD_OSS_KEY_ID:-} - - MD_OSS_KEY=${MD_OSS_KEY:-} - - REDIS_HOST=${REDIS_HOST:-redis} - - REDIS_PORT=${REDIS_PORT:-6379} - - REDIS_PASSWORD=${REDIS_PASSWORD:-} - depends_on: - db: - condition: service_healthy - - networks: - - seafile-net - -networks: - seafile-net: - name: seafile-net diff --git a/manual/repo/docker/pro/env b/manual/repo/docker/pro/env index 247f8e25..3f9b9b08 100644 --- a/manual/repo/docker/pro/env +++ b/manual/repo/docker/pro/env @@ -69,7 +69,7 @@ SEASEARCH_IMAGE=seafileltd/seasearch:latest SS_STORAGE_TYPE=disk # disk (local storage), s3, oss ### Local storage mode -SS_DATA_PATH=./data # Persistent storage path +SS_DATA_PATH=/opt/seasearch-data # Persistent storage path SS_MAX_OBJ_CACHE_SIZE=10GB ### S3 mode diff --git a/manual/setup/use_other_reverse_proxy.md b/manual/setup/use_other_reverse_proxy.md index 9d87f2c8..7afef44c 100644 --- a/manual/setup/use_other_reverse_proxy.md +++ b/manual/setup/use_other_reverse_proxy.md @@ -127,7 +127,7 @@ Modify `nginx.conf` and add reverse proxy for services ***seafile*** and ***sead } location /socket.io { - proxy_pass http://127.0.0.1:8888/; + proxy_pass http://127.0.0.1:8888; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; From 98c0bbebd75a56a3b19714924d684b2e7c9f36e9 Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Sun, 23 Feb 2025 14:30:32 +0800 Subject: [PATCH 2/2] fix: some error --- manual/setup/use_seasearch.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/manual/setup/use_seasearch.md b/manual/setup/use_seasearch.md index f29693a0..2c97dd24 100644 --- a/manual/setup/use_seasearch.md +++ b/manual/setup/use_seasearch.md @@ -47,8 +47,16 @@ If you would like to use *SeaSearch* as the search engine, the `elasticSearch` s ```yml services: - #elasticsearch: # remove or note the whole `elasticsearch` section - #... + seafile: + ... + depends_on: + ... + #elasticsearch: # remove or note the `elasticsearch` service Dependency + #condition: service_started + + + #elasticsearch: # remove or note the whole `elasticsearch` section + #... ``` ## Modify `seafevents.conf`