From 50813a40c82cdac733a9b44a58d7995d7c02670a Mon Sep 17 00:00:00 2001 From: Junxiang Huang Date: Sun, 23 Feb 2025 14:21:18 +0800 Subject: [PATCH] feat: metadata server --- .../{deploy-12.0.yml => deploy-13.0.yml} | 4 +- manual/README.md | 3 + manual/config/seafevents-conf.md | 13 ++- manual/config/seafile-conf.md | 6 +- manual/config/seahub_settings_py.md | 2 +- manual/extension/libreoffice_online.md | 2 +- manual/extension/metadata-server.md | 106 ++++++++++++------ manual/extension/notification-server.md | 6 +- manual/extension/only_office.md | 2 +- manual/extension/setup_seadoc.md | 6 +- manual/extension/virus_scan_with_clamav.md | 2 +- manual/repo/docker/md-server.yml | 2 +- manual/repo/docker/metadata-server/env | 40 +++++++ .../repo/docker/metadata-server/md-server.yml | 38 +++++++ manual/repo/docker/pro/env | 2 +- manual/setup/cluster_deploy_with_docker.md | 4 +- manual/setup/cluster_deploy_with_k8s.md | 14 +-- manual/setup/k8s_single_node.md | 24 ++-- manual/setup/migrate_ce_to_pro_with_docker.md | 4 +- manual/setup/migrate_non_docker_to_docker.md | 12 +- manual/setup/setup_ce_by_docker.md | 8 +- manual/setup/setup_pro_by_docker.md | 8 +- manual/setup/use_other_reverse_proxy.md | 2 +- manual/setup/use_seasearch.md | 13 ++- manual/upgrade/upgrade_a_cluster.md | 4 +- manual/upgrade/upgrade_docker.md | 12 +- mkdocs.yml | 2 +- 27 files changed, 233 insertions(+), 108 deletions(-) rename .github/workflows/{deploy-12.0.yml => deploy-13.0.yml} (88%) create mode 100644 manual/repo/docker/metadata-server/env create mode 100644 manual/repo/docker/metadata-server/md-server.yml diff --git a/.github/workflows/deploy-12.0.yml b/.github/workflows/deploy-13.0.yml similarity index 88% rename from .github/workflows/deploy-12.0.yml rename to .github/workflows/deploy-13.0.yml index 8dd0a2ac..015bd1d2 100644 --- a/.github/workflows/deploy-12.0.yml +++ b/.github/workflows/deploy-13.0.yml @@ -3,7 +3,7 @@ name: Deploy CI - 12.0 on: push: branches: - - master + - "13.0" jobs: deploy: @@ -19,4 +19,4 @@ jobs: - run: cd $GITHUB_WORKSPACE - run: git config user.name ci-bot - run: git config user.email ci-bot@seafile.com - - run: mike deploy --push -u 12.0 latest + - run: mike deploy --push -u 13.0 diff --git a/manual/README.md b/manual/README.md index d36fad3f..58e035c3 100644 --- a/manual/README.md +++ b/manual/README.md @@ -1,5 +1,8 @@ # Introduction +!!! note "Seafile 13.0" + Our document of ***Seafile 13.0*** is still in progress, **the updates of some key components have not been completed yet**. Please refer to [Seafile 12.0](https://manual.seafile.com) for more stable support. + Seafile is an open source cloud storage system for file sync, share and document collaboration. SeaDoc is an extension of Seafile that providing a lightweight online collaborative document feature. diff --git a/manual/config/seafevents-conf.md b/manual/config/seafevents-conf.md index 30354536..6fd3bccc 100644 --- a/manual/config/seafevents-conf.md +++ b/manual/config/seafevents-conf.md @@ -40,6 +40,13 @@ suffix = md,txt,... ## If you need to modify the file list format, you can add 'suffix = md, txt, ...' configuration items to achieve. +# From Seafile 13.0 Redis also support using in CE, and is the default cached server +[REDIS] +## redis use the 0 database and "repo_update" channel +server = 192.168.1.1 +port = 6379 +password = q!1w@#123 + ``` @@ -94,12 +101,6 @@ enabled = false ## Currently only support redis message queue mq_type = redis -[REDIS] -## redis use the 0 database and "repo_update" channel -server = 192.168.1.1 -port = 6379 -password = q!1w@#123 - [AUTO DELETION] enabled = true # Default is false, when enabled, users can use file auto deletion feature interval = 86400 # The unit is second(s), the default frequency is one day, that is, it runs once a day diff --git a/manual/config/seafile-conf.md b/manual/config/seafile-conf.md index eb5049db..79f8449d 100644 --- a/manual/config/seafile-conf.md +++ b/manual/config/seafile-conf.md @@ -55,12 +55,12 @@ expire_days = 60 Seafile uses a system trash, where deleted libraries will be moved to. In this way, accidentally deleted libraries can be recovered by system admin. -## Cache (Pro Edition Only) +## Cache -Seafile Pro Edition uses memory caches in various cases to improve performance. Some session information is also saved into memory cache to be shared among the cluster nodes. Memcached or Reids can be use for memory cache. +Seafile uses memory caches in various cases to improve performance. Some session information is also saved into memory cache to be shared among the cluster nodes. Memcached or Reids can be use for memory cache. !!! tip - Redis support is added in version 11.0. Currently only single-node Redis is supported. Redis Sentinel or Cluster is not supported yet. + Redis support is added in version 11.0 and is the default cache server from Seafile 13.0. Currently only single-node Redis is supported. Redis Sentinel or Cluster is not supported yet. === "memcached" diff --git a/manual/config/seahub_settings_py.md b/manual/config/seahub_settings_py.md index ffd737d5..7559e881 100644 --- a/manual/config/seahub_settings_py.md +++ b/manual/config/seahub_settings_py.md @@ -467,7 +467,7 @@ REST_FRAMEWORK = { # Throtting whitelist used to disable throttle for certain IPs. # e.g. REST_FRAMEWORK_THROTTING_WHITELIST = ['127.0.0.1', '192.168.1.1'] -# Please make sure `REMOTE_ADDR` header is configured in Nginx conf according to https://manual.seafile.com/12.0/setup_binary/ce/deploy_with_nginx.html. +# Please make sure `REMOTE_ADDR` header is configured in Nginx conf according to https://manual.seafile.com/13.0/setup_binary/ce/deploy_with_nginx.html. REST_FRAMEWORK_THROTTING_WHITELIST = [] ``` diff --git a/manual/extension/libreoffice_online.md b/manual/extension/libreoffice_online.md index cf52cad8..9091ed0a 100644 --- a/manual/extension/libreoffice_online.md +++ b/manual/extension/libreoffice_online.md @@ -27,7 +27,7 @@ Download the `collabora.yml` ```sh -wget https://manual.seafile.com/12.0/repo/docker/collabora.yml +wget https://manual.seafile.com/13.0/repo/docker/collabora.yml ``` Insert `collabora.yml` to field `COMPOSE_FILE` lists (i.e., `COMPOSE_FILE='...,collabora.yml'`) and add the relative options in `.env` diff --git a/manual/extension/metadata-server.md b/manual/extension/metadata-server.md index 89e69907..ec071fff 100644 --- a/manual/extension/metadata-server.md +++ b/manual/extension/metadata-server.md @@ -1,7 +1,3 @@ ---- -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. @@ -9,43 +5,66 @@ Metadata server aims to provide metadata management for your libraries, so as to ## 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. + The startup of Metadata server requires using ***Redis*** as the cached server (it should be the default cached server in Seafile 13.0). So you must deploy *Redis* for Seafile, then modify [`seafile.conf`](../config/seafile-conf.md#cache-pro-edition-only), [`seahub_settings.py`](https://docs.djangoproject.com/en/4.2/topics/cache/#redis) and [`seafevents.conf`](../config/seafevents-conf.md) to enable it before deploying metadata server. ### Download YML file - Please download YML file **in your `seafile-server.yml` directory** by following command: +Please download YML file **in your `seafile-server.yml` directory** by following command: + +=== "Deploy in the same machine with Seafile" ```sh - wget https://manual.seafile.com/12.0/repo/docker/md-server.yml + wget https://manual.seafile.com/13.0/repo/docker/md-server.yml ``` -### Modify `.env` according +=== "Standalone" -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: + ```sh + wget https://manual.seafile.com/13.0/repo/docker/metadata-server/md-server.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/metadata-server/env + ``` + + !!! warning "Important for standalone deployment" + Starting from Seafile 13.0, metadata server supports standalone deployment, but it still needs to maintain access to the original Seafile data directory. **Please make sure that the machine where metadata server is deployed can access the directory normally**. + +### Modify `.env` !!! 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. +Normally, you only need to set a `METADATA_SERVER_SECRET_KEY` for the metadata server in `.env`, and the metadata of the library will be stored locally (default is `opt/md-data`): + +```env +METADATA_SERVER_SECRET_KEY= +MD_DATA=/opt/md-data +``` + +!!! warning "About `METADATA_SERVER_SECRET_KEY`" + It is used to Seafile connect to metadata server, which can be generated by `pwgen -s 40 1`. However, we **do not recommend** to use the same as the original `JWT_PRIVATE_KEY` in `.env` **for security reasons**. + +The following table is all the related environment variables with metadata-server: | Variables | Description | Required | | --- | --- | --- | +| `METADATA_SERVER_SECRET_KEY` | The JWT key used to connect with Seafile server | **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` | +| `SEAFILE_VOLUME` | Directory for Seafile data | Optional, default `/opt/seafile-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_BUCKET` | Name of S3 bucket for storaging metadata. | **Required** when `MD_STORAGE_TYPE=s3` | | `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_KEY_ID` | S3 backend authorization key ID. | **Required** when `MD_STORAGE_TYPE=s3` | +| `MD_S3_KEY` | S3 backend authorization key secret. | **Required** when `MD_STORAGE_TYPE=s3` | | `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** | +| `MD_OSS_BUCKET` | Name of OSS bucket for storaging metadata. | **Required** when `MD_STORAGE_TYPE=oss` | +| `MD_OSS_KEY_ID` | OSS backend authorization key ID. | **Required** when `MD_STORAGE_TYPE=oss` | +| `MD_OSS_KEY` | OSS backend authorization key secret. | **Required** when `MD_STORAGE_TYPE=oss` | | `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 | @@ -58,32 +77,49 @@ Normally, you don't need to set additional variables in `.env` for metadata serv - 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**. +### Modify `seahub_settings.py` + +To enable metadata server in Seafile, please add the following field in your `seahub_settings.py`: + +=== "Deploy in the same machine with Seafile" + ```py + ENABLE_METADATA_MANAGEMENT = True + METADATA_SERVER_SECRET_KEY = ' ' + METADATA_SERVER_URL = 'http://metadata-server:8084' + ``` +=== "Standalone" + ```py + ENABLE_METADATA_MANAGEMENT = True + METADATA_SERVER_SECRET_KEY = ' ' + METADATA_SERVER_URL = 'http://:8084' + ``` + ## Start service -You can use following command to start metadata server: +You can use following command to start metadata server (and the Seafile service also have to restart): ```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: + If the container startups normally, the message you can get from the following logs - ```yml - services: - metadata-server: - ... - ports: - - ${MD_PORT:-8084}:${MD_PORT:-8084} - ... - ``` + - `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_DATA/log/seaf-md-server.log` + ```log + [2025-02-23 06:07:57] [INFO] starting seaf-md-server + ``` + - `$SEAFILE_VOLUME/seafile/logs/seafevents.log` + ```log + [2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.index_worker:134 refresh_lock refresh_thread Starting refresh locks + [2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.slow_task_handler:61 worker_handler slow_task_handler_thread_0 starting update metadata work + [2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.slow_task_handler:61 worker_handler slow_task_handler_thread_1 starting update metadata work + [2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.slow_task_handler:61 worker_handler slow_task_handler_thread_2 starting update metadata work + ``` +` diff --git a/manual/extension/notification-server.md b/manual/extension/notification-server.md index bad63516..cf67e974 100644 --- a/manual/extension/notification-server.md +++ b/manual/extension/notification-server.md @@ -17,7 +17,7 @@ The notification server uses websocket protocol and maintains a two-way communic Since Seafile 12.0, we use a separate Docker image to deploy the notification server. First download `notification-server.yml` to Seafile directory: ```sh -wget https://manual.seafile.com/12.0/repo/docker/notification-server.yml +wget https://manual.seafile.com/13.0/repo/docker/notification-server.yml ``` Modify `.env`, and insert `notification-server.yml` into `COMPOSE_FILE`: @@ -68,8 +68,8 @@ If you enable [clustering](../setup_binary/cluster_deployment.md), You need to d Download `.env` and `notification-server.yml` to notification server directory: ```sh -wget https://manual.seafile.com/12.0/repo/docker/notification-server/standalone/notification-server.yml -wget -O .env https://manual.seafile.com/12.0/repo/docker/notification-server/standalone/env +wget https://manual.seafile.com/13.0/repo/docker/notification-server/standalone/notification-server.yml +wget -O .env https://manual.seafile.com/13.0/repo/docker/notification-server/standalone/env ``` Then modify the `.env` file according to your environment. The following fields are needed to be modified: diff --git a/manual/extension/only_office.md b/manual/extension/only_office.md index c4481df5..f94dc7e8 100644 --- a/manual/extension/only_office.md +++ b/manual/extension/only_office.md @@ -11,7 +11,7 @@ Seafile supports [OnlyOffice](https://www.onlyoffice.com/) to view/edit office f Download the `onlyoffice.yml` ```shell -wget https://manual.seafile.com/12.0/repo/docker/onlyoffice.yml +wget https://manual.seafile.com/13.0/repo/docker/onlyoffice.yml ``` insert `onlyoffice.yml` into `COMPOSE_FILE` list (i.e., `COMPOSE_FILE='...,onlyoffice.yml'`), and add the following configurations of onlyoffice in `.env` file. diff --git a/manual/extension/setup_seadoc.md b/manual/extension/setup_seadoc.md index d376abcb..9746a18f 100644 --- a/manual/extension/setup_seadoc.md +++ b/manual/extension/setup_seadoc.md @@ -41,7 +41,7 @@ The easiest way to deployment SeaDoc is to deploy it with Seafile server on the 1. Download the `seadoc.yml` to `/opt/seafile` ```shell - wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml + wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml ``` 2. Modify `.env`, and insert `seadoc.yml` into `COMPOSE_FILE`, and enable SeaDoc server @@ -69,8 +69,8 @@ If you deploy Seafile in a cluster or if you deploy Seafile with binary package, 1. Download and modify the `.env` and `seadoc.yml` files to directory `/opt/seadoc` ```sh - wget https://manual.seafile.com/12.0/repo/docker/seadoc/1.0/standalone/seadoc.yml - wget -O .env https://manual.seafile.com/12.0/repo/docker/seadoc/1.0/standalone/env + wget https://manual.seafile.com/13.0/repo/docker/seadoc/1.0/standalone/seadoc.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/seadoc/1.0/standalone/env ``` 2. Then modify the `.env` file according to your environment. The following fields are needed to be modified: diff --git a/manual/extension/virus_scan_with_clamav.md b/manual/extension/virus_scan_with_clamav.md index 32ee4b12..92164dcd 100644 --- a/manual/extension/virus_scan_with_clamav.md +++ b/manual/extension/virus_scan_with_clamav.md @@ -9,7 +9,7 @@ If your Seafile server is deployed using [Docker](../setup/setup_pro_by_docker.m Download `clamav.yml` ```sh -wget https://manual.seafile.com/12.0/repo/docker/pro/clamav.yml +wget https://manual.seafile.com/13.0/repo/docker/pro/clamav.yml ``` Modify `.env`, insert `clamav.yml` to field `COMPOSE_FILE` diff --git a/manual/repo/docker/md-server.yml b/manual/repo/docker/md-server.yml index 6e7b755d..993bbd37 100644 --- a/manual/repo/docker/md-server.yml +++ b/manual/repo/docker/md-server.yml @@ -8,7 +8,7 @@ services: #ports: # - ${MD_PORT:-8084}:${MD_PORT:-8084} environment: - - JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty} + - JWT_PRIVATE_KEY=${METADATA_SERVER_SECRET_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} diff --git a/manual/repo/docker/metadata-server/env b/manual/repo/docker/metadata-server/env new file mode 100644 index 00000000..c6710d17 --- /dev/null +++ b/manual/repo/docker/metadata-server/env @@ -0,0 +1,40 @@ +# metadata server basic variables +MD_IMAGE=seafileltd/metadata-server:latest +JWT_PRIVATE_KEY= +MD_PORT=8084 # not recommond to modify +MD_LOG_LEVEL=info +MD_MAX_CACHE_SIZE=1GB +MD_STORAGE_TYPE=file +MD_DATA=/opt/md-data +SEAFILE_VOLUME=/opt/seafile-data + +# for MySQL +SEAFILE_MYSQL_DB_HOST= +SEAFILE_MYSQL_DB_PORT=3306 +SEAFILE_MYSQL_DB_USER=seafile +SEAFILE_MYSQL_DB_PASSWORD= +SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db +SEAFILE_LOG_TO_STDOUT=false + +# +MD_S3_HOST= +MD_S3_AWS_REGION= +MD_S3_USE_HTTPS=true +MD_S3_BUCKET= +MD_S3_PATH_STYLE_REQUEST=false +MD_S3_KEY_ID= +MD_S3_KEY= +MD_S3_USE_V4_SIGNATURE=true +MD_S3_SSE_C_KEY= + +# +MD_OSS_HOST= +MD_OSS_REGION= +MD_OSS_BUCKET= +MD_OSS_KEY_ID= +MD_OSS_KEY= + +# for Redis +REDIS_HOST= +REDIS_PORT=6379 +REDIS_PASSWORD= \ No newline at end of file diff --git a/manual/repo/docker/metadata-server/md-server.yml b/manual/repo/docker/metadata-server/md-server.yml new file mode 100644 index 00000000..dfe2f653 --- /dev/null +++ b/manual/repo/docker/metadata-server/md-server.yml @@ -0,0 +1,38 @@ +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:?Variable is not set or empty} + - 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:?Variable is not set or empty} + - REDIS_PORT=${REDIS_PORT:-6379} + - REDIS_PASSWORD=${REDIS_PASSWORD:-} 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/cluster_deploy_with_docker.md b/manual/setup/cluster_deploy_with_docker.md index df187b15..2a56265e 100644 --- a/manual/setup/cluster_deploy_with_docker.md +++ b/manual/setup/cluster_deploy_with_docker.md @@ -58,8 +58,8 @@ Please refer [here](./system_requirements.md#seafile-cluster) for the details ab 3. Download the `seafile-server.yml` and `.env` ```sh - wget -O .env https://manual.seafile.com/12.0/repo/docker/cluster/env - wget https://manual.seafile.com/12.0/repo/docker/cluster/seafile-server.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/cluster/env + wget https://manual.seafile.com/13.0/repo/docker/cluster/seafile-server.yml ``` 4. Modify the [variables](../config/env.md) in `.env` (especially the terms like `<...>`). diff --git a/manual/setup/cluster_deploy_with_k8s.md b/manual/setup/cluster_deploy_with_k8s.md index d2aedb18..cc1bb184 100644 --- a/manual/setup/cluster_deploy_with_k8s.md +++ b/manual/setup/cluster_deploy_with_k8s.md @@ -25,12 +25,12 @@ After installation, you need to start the k8s control plane service on each node ```sh mkdir -p /opt/seafile-k8s-yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-backend-deployment.yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-persistentvolume.yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-service.yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-env.yaml -wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-secret.yaml +wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-backend-deployment.yaml +wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-persistentvolume.yaml +wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml +wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-service.yaml +wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-env.yaml +wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-secret.yaml ``` @@ -135,7 +135,7 @@ Finally you can use the `tar -zcvf` and `tar -zxvf` commands to package the enti 1. Download frontend service's YAML by: ```sh - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-frontend-deployment.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-frontend-deployment.yaml ``` 2. Modify `seafile-env.yaml`, and set `CLUSTER_INIT_MODE` to `false` (i.e., disable initialization mode) diff --git a/manual/setup/k8s_single_node.md b/manual/setup/k8s_single_node.md index 81680d5b..2fcfd675 100644 --- a/manual/setup/k8s_single_node.md +++ b/manual/setup/k8s_single_node.md @@ -21,12 +21,12 @@ By the way, we don't provide the deployment methods of basic services (e.g., **M ```sh mkdir -p /opt/seafile-k8s-yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-deployment.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-persistentvolume.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-persistentvolumeclaim.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-service.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-env.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-secret.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-deployment.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-persistentvolume.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-persistentvolumeclaim.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-service.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-env.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-secret.yaml ``` === "Community edition" @@ -34,12 +34,12 @@ By the way, we don't provide the deployment methods of basic services (e.g., **M ```sh mkdir -p /opt/seafile-k8s-yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-deployment.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-persistentvolume.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-persistentvolumeclaim.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-service.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-env.yaml - wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-secret.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-deployment.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-persistentvolume.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-persistentvolumeclaim.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-service.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-env.yaml + wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-secret.yaml ``` In here we suppose you download the YAML files in `/opt/seafile-k8s-yaml`, which mainly include about: diff --git a/manual/setup/migrate_ce_to_pro_with_docker.md b/manual/setup/migrate_ce_to_pro_with_docker.md index 26a7c4c0..d15b8d56 100644 --- a/manual/setup/migrate_ce_to_pro_with_docker.md +++ b/manual/setup/migrate_ce_to_pro_with_docker.md @@ -7,8 +7,8 @@ 3. Download the `.env` and `seafile-server.yml` of Seafile Pro. ```sh -wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env -wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml +wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env +wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml ``` ## Migrate diff --git a/manual/setup/migrate_non_docker_to_docker.md b/manual/setup/migrate_non_docker_to_docker.md index f137e81e..493f5a21 100644 --- a/manual/setup/migrate_non_docker_to_docker.md +++ b/manual/setup/migrate_non_docker_to_docker.md @@ -65,17 +65,17 @@ You have to download the latest docker-compose files (i.e., series of `.yml` and === "Seafile CE" ```sh - wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env - wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml - wget https://manual.seafile.com/12.0/repo/docker/caddy.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env + wget https://manual.seafile.com/13.0/repo/docker/ce/seafile-server.yml + wget https://manual.seafile.com/13.0/repo/docker/caddy.yml ``` === "Seafile Pro" ```sh - wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env - wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml - wget https://manual.seafile.com/12.0/repo/docker/caddy.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env + wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml + wget https://manual.seafile.com/13.0/repo/docker/caddy.yml ``` Then modify the `.env` according to your configurations. diff --git a/manual/setup/setup_ce_by_docker.md b/manual/setup/setup_ce_by_docker.md index 1aa4132a..519a3fdf 100644 --- a/manual/setup/setup_ce_by_docker.md +++ b/manual/setup/setup_ce_by_docker.md @@ -25,10 +25,10 @@ mkdir /opt/seafile cd /opt/seafile # Seafile CE 12.0 -wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env -wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml -wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml -wget https://manual.seafile.com/12.0/repo/docker/caddy.yml +wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env +wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml +wget https://manual.seafile.com/13.0/repo/docker/ce/seafile-server.yml +wget https://manual.seafile.com/13.0/repo/docker/caddy.yml nano .env ``` diff --git a/manual/setup/setup_pro_by_docker.md b/manual/setup/setup_pro_by_docker.md index a2c6ef90..faf3ccc8 100644 --- a/manual/setup/setup_pro_by_docker.md +++ b/manual/setup/setup_pro_by_docker.md @@ -39,10 +39,10 @@ mkdir /opt/seafile cd /opt/seafile # Seafile PE 12.0 -wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env -wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml -wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml -wget https://manual.seafile.com/12.0/repo/docker/caddy.yml +wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env +wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml +wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml +wget https://manual.seafile.com/13.0/repo/docker/caddy.yml nano .env ``` 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'; diff --git a/manual/setup/use_seasearch.md b/manual/setup/use_seasearch.md index f29693a0..e8c66d33 100644 --- a/manual/setup/use_seasearch.md +++ b/manual/setup/use_seasearch.md @@ -16,7 +16,7 @@ SeaSearch service is currently mainly deployed via docker. We have integrated it into the relevant docker-compose file. You only need to download it to the same directory as `seafile-server.yml`: ```sh -wget https://manual.seafile.com/12.0/repo/docker/pro/seasearch.yml +wget https://manual.seafile.com/13.0/repo/docker/pro/seasearch.yml ``` ## Modify `.env` @@ -47,8 +47,15 @@ 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` diff --git a/manual/upgrade/upgrade_a_cluster.md b/manual/upgrade/upgrade_a_cluster.md index 0e41da13..fbe3cc1d 100644 --- a/manual/upgrade/upgrade_a_cluster.md +++ b/manual/upgrade/upgrade_a_cluster.md @@ -27,8 +27,8 @@ In general, to upgrade a cluster, you need: 2. Download the docker-compose files for *Seafile 12* ```sh - wget -O .env https://manual.seafile.com/12.0/repo/docker/cluster/env - wget https://manual.seafile.com/12.0/repo/docker/cluster/seafile-server.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/cluster/env + wget https://manual.seafile.com/13.0/repo/docker/cluster/seafile-server.yml ``` 3. Modify `.env`: diff --git a/manual/upgrade/upgrade_docker.md b/manual/upgrade/upgrade_docker.md index 4ba5c131..d177d298 100644 --- a/manual/upgrade/upgrade_docker.md +++ b/manual/upgrade/upgrade_docker.md @@ -26,9 +26,9 @@ Download [.env](../docker/ce/env), [seafile-server.yml](../docker/ce/seafile-ser === "Seafile community edition" ```sh - wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env - wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml - wget https://manual.seafile.com/12.0/repo/docker/caddy.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env + wget https://manual.seafile.com/13.0/repo/docker/ce/seafile-server.yml + wget https://manual.seafile.com/13.0/repo/docker/caddy.yml ``` The following fields merit particular attention: @@ -49,9 +49,9 @@ Download [.env](../docker/ce/env), [seafile-server.yml](../docker/ce/seafile-ser === "Seafile pro edition" ```sh - wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env - wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml - wget https://manual.seafile.com/12.0/repo/docker/caddy.yml + wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env + wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml + wget https://manual.seafile.com/13.0/repo/docker/caddy.yml ``` The following fields merit particular attention: diff --git a/mkdocs.yml b/mkdocs.yml index d56c54e9..96952e58 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -136,7 +136,7 @@ nav: - Extra Seafile components: - SeaDoc Integration: extension/setup_seadoc.md - Notification Server: extension/notification-server.md - #- Metadata Server: extension/metadata-server.md + - Metadata Server: extension/metadata-server.md - WebDAV extension: extension/webdav.md - FUSE extension: extension/fuse.md - Online Office: