From 9e80a20a8eab5d31c2835ffed939a93bf9502633 Mon Sep 17 00:00:00 2001 From: Huang Junxiang Date: Mon, 31 Mar 2025 18:06:02 +0800 Subject: [PATCH] perf: docker compose resource files (#497) * perf: docker compose resource files * Additional Notes for s3 * perf: docker compose resource files * perf: docker compose resource files * perf: Update Docker and k8s deployment resource files to enhance user experience * style(md-server.yml for standalone): use unified format for S3 configs * update Seafile S3 init Configs by using USE_S3_STORAGE --- manual/config/env.md | 49 ++++++++---- manual/extension/metadata-server.md | 43 ++++------ manual/repo/docker/ce/env | 4 +- manual/repo/docker/ce/seafile-server.yml | 14 ++-- manual/repo/docker/cluster/env | 11 ++- manual/repo/docker/cluster/seafile-server.yml | 16 ++-- manual/repo/docker/md-server.yml | 18 ++--- manual/repo/docker/metadata-server/env | 18 ++--- .../repo/docker/metadata-server/md-server.yml | 18 ++--- manual/repo/docker/pro/env | 70 ++++++---------- manual/repo/docker/pro/seafile-server.yml | 38 ++++----- manual/repo/docker/pro/seasearch.yml | 18 ++--- manual/repo/k8s/ce/seafile-deployment.yaml | 28 +++---- manual/repo/k8s/ce/seafile-env.yaml | 5 +- manual/repo/k8s/ce/seafile-secret.yaml | 5 +- .../cluster/seafile-backend-deployment.yaml | 41 +++++++--- manual/repo/k8s/cluster/seafile-env.yaml | 9 ++- .../cluster/seafile-frontend-deployment.yaml | 25 +++++- manual/repo/k8s/cluster/seafile-secret.yaml | 3 +- manual/repo/k8s/pro/seafile-deployment.yaml | 39 ++++++--- manual/repo/k8s/pro/seafile-env.yaml | 12 +-- manual/repo/k8s/pro/seafile-secret.yaml | 6 +- manual/setup/cluster_deploy_with_docker.md | 6 +- manual/setup/helm_chart_cluster.md | 3 +- manual/setup/helm_chart_single_node.md | 12 +-- manual/setup/setup_ce_by_docker.md | 4 +- manual/setup/setup_pro_by_docker.md | 40 +++++----- manual/setup/setup_with_s3.md | 19 +---- manual/setup/use_seasearch.md | 19 +++++ manual/upgrade/upgrade_docker.md | 79 ++++++++----------- 30 files changed, 360 insertions(+), 312 deletions(-) diff --git a/manual/config/env.md b/manual/config/env.md index b0a83781..057a89c2 100644 --- a/manual/config/env.md +++ b/manual/config/env.md @@ -41,13 +41,13 @@ The [`.env`](../repo/docker/pro/env) file will be used to specify the components ### Redis configurations This part of configurations is only valid in `CACHE_PROVIDER=redis` -- `REDIS_SERVER`: Redis server host, default is `redis` +- `REDIS_HOST`: Redis server host, default is `redis` - `REDIS_PORT`: Redis server port, default is `6379` - `REDIS_PASSWORD`: Redis server password. You need to uncheck the mark of the `command` part of the `redis` service in `seafile-server.yml` to enable this feature if you are using the integrated Redis server in Seafile Docker. ### Redis configurations This part of configurations is only valid in `CACHE_PROVIDER=memcached` -- `MEMCACHED_SERVER`: Memcached server host, default is `memcached` +- `MEMCACHED_HOST`: Memcached server host, default is `memcached` - `MEMCACHED_PORT`: Memcached server port, default is `11211` ## Seafile-server configurations @@ -67,25 +67,42 @@ This part of configurations is only valid in `CACHE_PROVIDER=memcached` ## Cluster init configuration - `CLUSTER_INIT_MODE`: (only valid in pro edition at deploying first time). Cluster initialization mode, in which the necessary configuration files for the service to run will be generated (but **the service will not be started**). If the configuration file already exists, no operation will be performed. The default value is `true`. When the configuration file is generated, ***be sure to set this item to `false`***. -- `CLUSTER_INIT_MEMCACHED_HOST`: (only valid in pro edition at deploying first time). Cluster Memcached host. (If your Memcached server dose not use port `11211`, please modify the [seahub_settings.py](./seahub_settings_py.md) and [seafile.conf](./seafile-conf.md)). - `CLUSTER_INIT_ES_HOST`: (only valid in pro edition at deploying first time). Your cluster Elasticsearch server host. - `CLUSTER_INIT_ES_PORT`: (only valid in pro edition at deploying first time). Your cluster Elasticsearch server port. Default is `9200`. - `CLUSTER_MODE`: Seafile service node type, i.e., `frontend` (default) or `backend` -## S3 storage backend configurations (only valid in pro edition at deploying first time) +## S3 storage backend configurations -- `INIT_S3_STORAGE_BACKEND_CONFIG`: Whether to configure S3 storage backend synchronously during initialization (i.e., the following features in this section, for more details, please refer to [AWS S3](../setup/setup_with_s3.md)), default is `false`. -- `INIT_S3_COMMIT_BUCKET`: S3 storage backend fs objects bucket -- `INIT_S3_FS_BUCKET`: S3 storage backend block objects bucket -- `INIT_S3_BLOCK_BUCKET`: S3 storage backend block objects bucket -- `INIT_S3_KEY_ID`: S3 storage backend key ID -- `INIT_S3_SECRET_KEY`: S3 storage backend secret key -- `INIT_S3_USE_V4_SIGNATURE`: Use the v4 protocol of S3 if enabled, default is `true` -- `INIT_S3_AWS_REGION`: Region of your buckets (AWS only), default is `us-east-1`. (Only valid when `INIT_S3_USE_V4_SIGNATURE` sets to `true`) -- `INIT_S3_HOST`: Host of your buckets, default is `s3.us-east-1.amazonaws.com`. (Only valid when `INIT_S3_USE_V4_SIGNATURE` sets to `true`) -- `INIT_S3_USE_HTTPS`: Use HTTPS connections to S3 if enabled, default is `true` -- `INIT_S3_PATH_STYLE_REQUEST`: This option asks Seafile to use URLs like `https://192.168.1.123:8080/bucketname/object` to access objects. In *Amazon S3*, the default URL format is in virtual host style, such as `https://bucketname.s3.amazonaws.com/object`. But this style relies on advanced DNS server setup. So most self-hosted storage systems only implement the path style format. Default `true`. -- `INIT_S3_SSE_C_KEY`: A string of 32 characters can be generated by openssl rand -base64 24. It can be any 32-character long random string. It's required to use V4 authentication protocol and https if you enable SSE-C. +- `USE_S3_STORAGE`: Use S3 backend storage in Seafile server + +### S3 storage backend configurations in initialization + +- `S3_COMMIT_BUCKET`: S3 storage backend fs objects bucket +- `S3_FS_BUCKET`: S3 storage backend block objects bucket +- `S3_BLOCK_BUCKET`: S3 storage backend block objects bucket +- `S3_KEY_ID`: S3 storage backend key ID +- `S3_SECRET_KEY`: S3 storage backend secret key +- `S3_USE_V4_SIGNATURE`: Use the v4 protocol of S3 if enabled, default is `true` +- `S3_AWS_REGION`: Region of your buckets (AWS only), default is `us-east-1`. +- `S3_HOST`: Host of your buckets, default is `s3.us-east-1.amazonaws.com`. +- `S3_USE_HTTPS`: Use HTTPS connections to S3 if enabled, default is `true` +- `S3_PATH_STYLE_REQUEST`: This option asks Seafile to use URLs like `https://192.168.1.123:8080/bucketname/object` to access objects. In *Amazon S3*, the default URL format is in virtual host style, such as `https://bucketname.s3.amazonaws.com/object`. But this style relies on advanced DNS server setup. So most self-hosted storage systems only implement the path style format. Default `false`. +- `S3_SSE_C_KEY`: A string of 32 characters can be generated by openssl rand -base64 24. It can be any 32-character long random string. It's required to use V4 authentication protocol and https if you enable SSE-C. + +!!! success "Easier to configure S3 for Seafile and its components" + Since Seafile Pro 13.0, in order to facilitate users to deploy Seafile's related extension components and other services in the future, a section will be provided in `.env` to store the **S3 authorization Configurations**. You can locate it with the following title bar: + + ```sh + ################################### + # S3 authorization Configurations # + # (This configurations will # + # apply to all components) # + ################################### + ``` + + The S3 authorization configuration part (i.e., ***without buckets name***) in Seafile initialization and some extension components (such as *SeaSearch*, *Metadata server*) configuration will be read from this configuration by default. + + However, please note that **Seafile currently still reads S3 configurations [through `seafile.conf`](../setup/setup_with_s3.md), and the configuration in `.env` is only used for initialization of Seafile services**. But you have to **make sure they are consistent**. ## SeaSearch diff --git a/manual/extension/metadata-server.md b/manual/extension/metadata-server.md index 1dae7d4a..728a6c77 100644 --- a/manual/extension/metadata-server.md +++ b/manual/extension/metadata-server.md @@ -58,30 +58,28 @@ MD_STORAGE_TYPE=file First you need to create a bucket for Metadata on your S3 storage backend provider. Then add or modify the following information to `.env`: !!! success "Easier to configure S3 for Seafile and its components" - Since Seafile Pro 13.0, in order to facilitate users to deploy Seafile's related extension components and other services in the future, a section will be provided in `.env` to store the **default S3 authorization information configuration**. You can locate it with the following title bar: + Since Seafile Pro 13.0, in order to facilitate users to deploy Seafile's related extension components and other services in the future, a section will be provided in `.env` to store the **S3 authorization Configurations**. You can locate it with the following title bar: ```sh - ########################################### - # Default S3 authorization Configurations # - ########################################### + ################################### + # S3 authorization Configurations # + # (This configurations will # + # apply to all components) # + ################################### ``` The S3 authorization configuration part (i.e., ***without buckets name***) in Seafile initialization and some extension components (such as *SeaSearch*, *Metadata server*) configuration will be read from this configuration by default. - - By the way, you can also manually modify the configurations for specific service (this is the situation when you have selected different S3 service providers for these components). + + In other words, if you deploy SeaSearch and Seafile together, and if you have deployed Seafile Pro following [here](../setup/setup_pro_by_docker.md#downloading-and-modifying-env) (and using the latest `.env`), you only need to specify the following variables in `.env` to make it work: + + ```sh + S3_MD_BUCKET= + ``` ```sh MD_IMAGE=seafileltd/seafile-md-server:latest MD_STORAGE_TYPE=s3 -MD_S3_BUCKET= -MD_S3_HOST= -MD_S3_AWS_REGION= # only needed for AWS -MD_S3_USE_HTTPS=true -MD_S3_PATH_STYLE_REQUEST=false -MD_S3_KEY_ID= -MD_S3_KEY= -MD_S3_USE_V4_SIGNATURE=true -MD_S3_SSE_C_KEY= +S3_MD_BUCKET= ``` #### List of environment variables for Metadata server @@ -95,20 +93,9 @@ The following table is all the related environment variables with Metadata serve | `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 | +| `S3_MD_BUCKET` | Your S3 bucket name for the bucket storing metadata | Required when using S3 | -And here is other optional values when your `MD_STORAGE_TYPE=s3: - -| Variables | Description | Required | - | --- | --- | --- | -| `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 | +In addition, there are some environment variables **related to S3 authorization**, please refer to the part with `S3_` prefix in this [table](../setup/setup_pro_by_docker.md#downloading-and-modifying-env). ### Modify `seahub_settings.py` diff --git a/manual/repo/docker/ce/env b/manual/repo/docker/ce/env index fc97c3f2..752fa805 100644 --- a/manual/repo/docker/ce/env +++ b/manual/repo/docker/ce/env @@ -45,12 +45,12 @@ SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db CACHE_PROVIDER=redis # or memcached ### Redis -REDIS_SERVER=redis +REDIS_HOST=redis REDIS_PORT=6379 REDIS_PASSWORD= ### Memcached -MEMCACHED_SERVER=memcached +MEMCACHED_HOST=memcached MEMCACHED_PORT=11211 ###################################### diff --git a/manual/repo/docker/ce/seafile-server.yml b/manual/repo/docker/ce/seafile-server.yml index a82f3bc2..c6179fd9 100644 --- a/manual/repo/docker/ce/seafile-server.yml +++ b/manual/repo/docker/ce/seafile-server.yml @@ -42,11 +42,11 @@ services: volumes: - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared environment: - - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db} - - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306} - - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile} - - DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-} - - DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?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} + - INIT_SEAFILE_MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-} - SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db} - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db} - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db} @@ -62,10 +62,10 @@ services: - ENABLE_SEADOC=${ENABLE_SEADOC:-true} - SEADOC_SERVER_URL=${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}/sdoc-server - CACHE_PROVIDER=${CACHE_PROVIDER:-redis} - - REDIS_SERVER=${REDIS_SERVER:-redis} + - REDIS_HOST=${REDIS_HOST:-redis} - REDIS_PORT=${REDIS_PORT:-6379} - REDIS_PASSWORD=${REDIS_PASSWORD:-} - - MEMCACHED_SERVER=${MEMCACHED_SERVER:-memcache} + - MEMCACHED_HOST=${MEMCACHED_HOST:-memcached} - MEMCACHED_PORT=${MEMCACHED_PORT:-11211} labels: caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} diff --git a/manual/repo/docker/cluster/env b/manual/repo/docker/cluster/env index 653ac489..58937f62 100644 --- a/manual/repo/docker/cluster/env +++ b/manual/repo/docker/cluster/env @@ -27,6 +27,13 @@ SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet_db SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db +## Memcached +MEMCACHED_HOST= +MEMCACHED_PORT=11211 + +## S3 +USE_S3_STORAGE=false + ###################################### # Initial variables # # (Only valid in first-time startup) # @@ -34,7 +41,6 @@ SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db ## Cluster init CLUSTER_INIT_MODE=true # set to false after finishing initial progress -CLUSTER_INIT_MEMCACHED_HOST= CLUSTER_INIT_ES_HOST= CLUSTER_INIT_ES_PORT=9200 @@ -46,11 +52,10 @@ INIT_SEAFILE_ADMIN_EMAIL=me@example.com INIT_SEAFILE_ADMIN_PASSWORD=asecret ## Init S3 configurations -INIT_S3_STORAGE_BACKEND_CONFIG=false INIT_S3_KEY_ID= INIT_S3_SECRET_KEY= INIT_S3_USE_V4_SIGNATURE=true -INIT_S3_PATH_STYLE_REQUEST=true # false for AWS +INIT_S3_PATH_STYLE_REQUEST=false INIT_S3_AWS_REGION=us-east-1 INIT_S3_HOST=s3.us-east-1.amazonaws.com INIT_S3_USE_HTTPS=true diff --git a/manual/repo/docker/cluster/seafile-server.yml b/manual/repo/docker/cluster/seafile-server.yml index 857cb39b..d0ec23e4 100644 --- a/manual/repo/docker/cluster/seafile-server.yml +++ b/manual/repo/docker/cluster/seafile-server.yml @@ -7,17 +7,19 @@ services: volumes: - ${SEAFILE_VOLUME:-/opt/seafile/shared}:/shared environment: - - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db} - - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306} - - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile} - - DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-} - - DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty} + - INIT_SEAFILE_MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-} + - 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_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db} - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db} - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db} + - CACHE_PROVIDER=memcached + - MEMCACHED_HOST=${MEMCACHED_HOST:-memcached} + - MEMCACHED_PORT=${MEMCACHED_PORT:-11211} - CLUSTER_SERVER=true - CLUSTER_INIT_MODE=${CLUSTER_INIT_MODE:-false} - - CLUSTER_INIT_MEMCACHED_HOST=${CLUSTER_INIT_MEMCACHED_HOST:-} - CLUSTER_INIT_ES_HOST=${CLUSTER_INIT_MEMCACHED_HOST:-} - CLUSTER_INIT_ES_PORT=${CLUSTER_INIT_ES_PORT:-9200} - SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} @@ -26,7 +28,7 @@ services: - TIME_ZONE=${TIME_ZONE:-UTC} - INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com} - INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret} - - INIT_S3_STORAGE_BACKEND_CONFIG=${INIT_S3_STORAGE_BACKEND_CONFIG:-false} + - USE_S3_STORAGE=${USE_S3_STORAGE:-false} - INIT_S3_COMMIT_BUCKET=${INIT_S3_COMMIT_BUCKET:-} - INIT_S3_FS_BUCKET=${INIT_S3_FS_BUCKET:-} - INIT_S3_BLOCK_BUCKET=${INIT_S3_BLOCK_BUCKET:-} diff --git a/manual/repo/docker/md-server.yml b/manual/repo/docker/md-server.yml index 5e9e41ae..1491f42f 100644 --- a/manual/repo/docker/md-server.yml +++ b/manual/repo/docker/md-server.yml @@ -18,15 +18,15 @@ services: - 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_S3_BUCKET=${S3_MD_BUCKET:-} + - MD_S3_HOST=${S3_HOST:-} + - MD_S3_AWS_REGION=${S3_AWS_REGION:-} + - MD_S3_USE_HTTPS=${S3_USE_HTTPS:-true} + - MD_S3_PATH_STYLE_REQUEST=${S3_PATH_STYLE_REQUEST:-false} + - MD_S3_KEY_ID=${S3_KEY_ID:-} + - MD_S3_KEY=${S3_SECRET_KEY:-} + - MD_S3_USE_V4_SIGNATURE=${S3_USE_V4_SIGNATURE:-true} + - MD_S3_SSE_C_KEY=${S3_SSE_C_KEY:-} - MD_OSS_HOST=${MD_OSS_HOST:-} - MD_OSS_REGION=${MD_OSS_REGION:-} - MD_OSS_BUCKET=${MD_OSS_BUCKET:-} diff --git a/manual/repo/docker/metadata-server/env b/manual/repo/docker/metadata-server/env index 45aa159e..440d8258 100644 --- a/manual/repo/docker/metadata-server/env +++ b/manual/repo/docker/metadata-server/env @@ -16,15 +16,15 @@ SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db SEAFILE_LOG_TO_STDOUT=false # for s3 configurations -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= +S3_MD_BUCKET= +S3_HOST= +S3_AWS_REGION= +S3_USE_HTTPS=true +S3_PATH_STYLE_REQUEST=false +S3_KEY_ID= +S3_KEY= +S3_USE_V4_SIGNATURE=true +S3_SSE_C_KEY= # for oss configurations MD_OSS_HOST= diff --git a/manual/repo/docker/metadata-server/md-server.yml b/manual/repo/docker/metadata-server/md-server.yml index fc4bfce9..6f60d844 100644 --- a/manual/repo/docker/metadata-server/md-server.yml +++ b/manual/repo/docker/metadata-server/md-server.yml @@ -18,15 +18,15 @@ services: - 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_S3_HOST=${S3_HOST:-} + - MD_S3_AWS_REGION=${S3_AWS_REGION:-} + - MD_S3_USE_HTTPS=${S3_USE_HTTPS:-true} + - MD_S3_BUCKET=${S3_MD_BUCKET:-} + - MD_S3_PATH_STYLE_REQUEST=${S3_PATH_STYLE_REQUEST:-false} + - MD_S3_KEY_ID=${S3_KEY_ID:-} + - MD_S3_KEY=${S3_SECRET_KEY:-} + - MD_S3_USE_V4_SIGNATURE=${S3_USE_V4_SIGNATURE:-true} + - MD_S3_SSE_C_KEY=${S3_SSE_C_KEY:-} - MD_OSS_HOST=${MD_OSS_HOST:-} - MD_OSS_REGION=${MD_OSS_REGION:-} - MD_OSS_BUCKET=${MD_OSS_BUCKET:-} diff --git a/manual/repo/docker/pro/env b/manual/repo/docker/pro/env index b3fce2d7..3809459b 100644 --- a/manual/repo/docker/pro/env +++ b/manual/repo/docker/pro/env @@ -50,26 +50,19 @@ SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db CACHE_PROVIDER=redis # options: redis (recommend), memcached ### Redis -REDIS_SERVER=redis +REDIS_HOST=redis REDIS_PORT=6379 REDIS_PASSWORD= ### Memcached -MEMCACHED_SERVER=memcached +MEMCACHED_HOST=memcached MEMCACHED_PORT=11211 -########################################### -# Default S3 authorization Configurations # -########################################### - -DEFAULT_S3_KEY_ID= -DEFAULT_S3_SECRET_KEY= -DEFAULT_S3_USE_V4_SIGNATURE=true -DEFAULT_S3_PATH_STYLE_REQUEST=true # false for AWS -DEFAULT_S3_AWS_REGION=us-east-1 -DEFAULT_S3_HOST=s3.us-east-1.amazonaws.com -DEFAULT_S3_USE_HTTPS=true -DEFAULT_S3_SSE_C_KEY= +### S3 +USE_S3_STORAGE=false +S3_COMMIT_BUCKET= +S3_FS_BUCKET= +S3_BLOCK_BUCKET= ###################################### # Initial variables # @@ -88,20 +81,6 @@ INIT_SEAFILE_ADMIN_PASSWORD=asecret INIT_SS_ADMIN_USER=$INIT_SEAFILE_ADMIN_EMAIL INIT_SS_ADMIN_PASSWORD=$INIT_SEAFILE_ADMIN_PASSWORD -## Init S3 configurations -INIT_S3_STORAGE_BACKEND_CONFIG=false -INIT_S3_COMMIT_BUCKET= -INIT_S3_FS_BUCKET= -INIT_S3_BLOCK_BUCKET= -INIT_S3_KEY_ID=$DEFAULT_S3_KEY_ID -INIT_S3_SECRET_KEY=$DEFAULT_S3_SECRET_KEY -INIT_S3_USE_V4_SIGNATURE=$DEFAULT_S3_USE_V4_SIGNATURE -INIT_S3_PATH_STYLE_REQUEST=$DEFAULT_S3_PATH_STYLE_REQUEST # false for AWS -INIT_S3_AWS_REGION=$DEFAULT_S3_AWS_REGION -INIT_S3_HOST=$DEFAULT_S3_HOST -INIT_S3_USE_HTTPS=$DEFAULT_S3_USE_HTTPS -INIT_S3_SSE_C_KEY=$DEFAULT_S3_SSE_C_KEY - ############################################ # Additional configurations for extensions # ############################################ @@ -118,15 +97,7 @@ SS_STORAGE_TYPE=disk # options: disk (local disk), s3 SS_MAX_OBJ_CACHE_SIZE=10GB ### S3 -SS_S3_BUCKET= -SS_S3_USE_V4_SIGNATURE=$DEFAULT_S3_USE_V4_SIGNATURE -SS_S3_ACCESS_ID=$DEFAULT_S3_KEY_ID -SS_S3_ACCESS_SECRET=$DEFAULT_S3_SECRET_KEY -SS_S3_ENDPOINT=$DEFAULT_S3_HOST -SS_S3_USE_HTTPS=$DEFAULT_S3_USE_HTTPS -SS_S3_PATH_STYLE_REQUEST=$DEFAULT_S3_PATH_STYLE_REQUEST -SS_S3_AWS_REGION=$DEFAULT_S3_AWS_REGION -SS_S3_SSE_C_KEY=$DEFAULT_S3_SSE_C_KEY +S3_SS_BUCKET= ### Log SS_LOG_TO_STDOUT=false @@ -137,12 +108,19 @@ SS_LOG_LEVEL=info MD_STORAGE_TYPE=file # options: file (local disk), s3, oss ### S3 -MD_S3_BUCKET= -MD_S3_HOST=$DEFAULT_S3_HOST -MD_S3_AWS_REGION=$DEFAULT_S3_AWS_REGION -MD_S3_USE_HTTPS=$DEFAULT_S3_USE_HTTPS -MD_S3_PATH_STYLE_REQUEST=$DEFAULT_S3_PATH_STYLE_REQUEST -MD_S3_KEY_ID=$DEFAULT_S3_KEY_ID -MD_S3_KEY=$DEFAULT_S3_SECRET_KEY -MD_S3_USE_V4_SIGNATURE=$DEFAULT_S3_USE_V4_SIGNATURE -MD_S3_SSE_C_KEY=$DEFAULT_S3_SSE_C_KEY +S3_MD_BUCKET= + +################################### +# S3 authorization Configurations # +# (This configurations will # +# apply to all components) # +################################### + +S3_KEY_ID= +S3_SECRET_KEY= +S3_USE_V4_SIGNATURE=true +S3_PATH_STYLE_REQUEST=false +S3_AWS_REGION=us-east-1 +S3_HOST=s3.us-east-1.amazonaws.com +S3_USE_HTTPS=true +S3_SSE_C_KEY= diff --git a/manual/repo/docker/pro/seafile-server.yml b/manual/repo/docker/pro/seafile-server.yml index e270bebe..f5d70377 100644 --- a/manual/repo/docker/pro/seafile-server.yml +++ b/manual/repo/docker/pro/seafile-server.yml @@ -42,11 +42,11 @@ services: volumes: - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared environment: - - DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db} - - DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306} - - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile} - - DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-} - - DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty} + - INIT_SEAFILE_MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-} + - 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_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db} - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db} - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db} @@ -62,23 +62,23 @@ services: - ENABLE_SEADOC=${ENABLE_SEADOC:-true} - SEADOC_SERVER_URL=${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}/sdoc-server - CACHE_PROVIDER=${CACHE_PROVIDER:-redis} - - REDIS_SERVER=${REDIS_SERVER:-redis} + - REDIS_HOST=${REDIS_HOST:-redis} - REDIS_PORT=${REDIS_PORT:-6379} - REDIS_PASSWORD=${REDIS_PASSWORD:-} - - MEMCACHED_SERVER=${MEMCACHED_SERVER:-memcache} + - MEMCACHED_HOST=${MEMCACHED_HOST:-memcached} - MEMCACHED_PORT=${MEMCACHED_PORT:-11211} - - INIT_S3_STORAGE_BACKEND_CONFIG=${INIT_S3_STORAGE_BACKEND_CONFIG:-false} - - INIT_S3_COMMIT_BUCKET=${INIT_S3_COMMIT_BUCKET:-} - - INIT_S3_FS_BUCKET=${INIT_S3_FS_BUCKET:-} - - INIT_S3_BLOCK_BUCKET=${INIT_S3_BLOCK_BUCKET:-} - - INIT_S3_KEY_ID=${INIT_S3_KEY_ID:-} - - INIT_S3_SECRET_KEY=${INIT_S3_SECRET_KEY:-} - - INIT_S3_USE_V4_SIGNATURE=${INIT_S3_USE_V4_SIGNATURE:-true} - - INIT_S3_AWS_REGION=${INIT_S3_AWS_REGION:-us-east-1} - - INIT_S3_HOST=${INIT_S3_HOST:-s3.us-east-1.amazonaws.com} - - INIT_S3_USE_HTTPS=${INIT_S3_USE_HTTPS:-true} - - INIT_S3_PATH_STYLE_REQUEST=${INIT_S3_PATH_STYLE_REQUEST:-false} - - INIT_S3_SSE_C_KEY=${INIT_S3_SSE_C_KEY:-} + - USE_S3_STORAGE=${USE_S3_STORAGE:-false} + - INIT_S3_COMMIT_BUCKET=${S3_COMMIT_BUCKET:-} + - INIT_S3_FS_BUCKET=${S3_FS_BUCKET:-} + - INIT_S3_BLOCK_BUCKET=${S3_BLOCK_BUCKET:-} + - INIT_S3_KEY_ID=${S3_KEY_ID:-} + - INIT_S3_SECRET_KEY=${S3_SECRET_KEY:-} + - INIT_S3_USE_V4_SIGNATURE=${S3_USE_V4_SIGNATURE:-true} + - INIT_S3_AWS_REGION=${S3_AWS_REGION:-us-east-1} + - INIT_S3_HOST=${S3_HOST:-s3.us-east-1.amazonaws.com} + - INIT_S3_USE_HTTPS=${S3_USE_HTTPS:-true} + - INIT_S3_PATH_STYLE_REQUEST=${S3_PATH_STYLE_REQUEST:-false} + - INIT_S3_SSE_C_KEY=${S3_SSE_C_KEY:-} labels: caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty} caddy.reverse_proxy: "{{upstreams 80}}" diff --git a/manual/repo/docker/pro/seasearch.yml b/manual/repo/docker/pro/seasearch.yml index 84aea0ff..288190a8 100644 --- a/manual/repo/docker/pro/seasearch.yml +++ b/manual/repo/docker/pro/seasearch.yml @@ -9,15 +9,15 @@ services: - SS_FIRST_ADMIN_PASSWORD=${INIT_SS_ADMIN_PASSWORD:-} - SS_STORAGE_TYPE=${SS_STORAGE_TYPE:-} - SS_MAX_OBJ_CACHE_SIZE=${SS_MAX_OBJ_CACHE_SIZE:-10GB} - - SS_S3_ACCESS_ID=${SS_S3_ACCESS_ID:-} - - SS_S3_USE_V4_SIGNATURE=${SS_S3_USE_V4_SIGNATURE:-false} - - SS_S3_ACCESS_SECRET=${SS_S3_ACCESS_SECRET:-} - - SS_S3_ENDPOINT=${SS_S3_ENDPOINT:-s3.us-east-1.amazonaws.com`} - - SS_S3_BUCKET=${SS_S3_BUCKET:-} - - SS_S3_USE_HTTPS=${SS_S3_USE_HTTPS:-true} - - SS_S3_PATH_STYLE_REQUEST=${SS_S3_PATH_STYLE_REQUEST:-true} - - SS_S3_AWS_REGION=${SS_S3_AWS_REGION:-us-east-1} - - SS_S3_SSE_C_KEY=${SS_S3_SSE_C_KEY:-} + - SS_S3_BUCKET=${S3_SS_BUCKET:-} + - SS_S3_ACCESS_ID=${S3_KEY_ID:-} + - SS_S3_USE_V4_SIGNATURE=${S3_USE_V4_SIGNATURE:-true} + - SS_S3_ACCESS_SECRET=${S3_SECRET_KEY:-} + - SS_S3_ENDPOINT=${S3_HOST:-s3.us-east-1.amazonaws.com`} + - SS_S3_USE_HTTPS=${S3_USE_HTTPS:-true} + - SS_S3_PATH_STYLE_REQUEST=${S3_PATH_STYLE_REQUEST:-true} + - SS_S3_AWS_REGION=${S3_AWS_REGION:-us-east-1} + - SS_S3_SSE_C_KEY=${S3_SSE_C_KEY:-} - SS_LOG_TO_STDOUT=${SS_LOG_TO_STDOUT:-false} - SS_LOG_DIR=${SS_LOG_DIR:-/opt/seasearch/data/log} - SS_LOG_LEVEL=${SS_LOG_LEVEL:-info} diff --git a/manual/repo/k8s/ce/seafile-deployment.yaml b/manual/repo/k8s/ce/seafile-deployment.yaml index 9d8497c4..6ed30d6e 100644 --- a/manual/repo/k8s/ce/seafile-deployment.yaml +++ b/manual/repo/k8s/ce/seafile-deployment.yaml @@ -51,17 +51,17 @@ spec: configMapKeyRef: name: seafile-env key: SEADOC_SERVER_URL - - name: DB_HOST + - name: SEAFILE_MYSQL_DB_HOST valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_HOST - - name: DB_PORT + - name: SEAFILE_MYSQL_DB_PORT valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_PORT - - name: DB_USER + - name: SEAFILE_MYSQL_DB_USER valueFrom: configMapKeyRef: name: seafile-env @@ -91,26 +91,21 @@ spec: configMapKeyRef: name: seafile-env key: CACHE_PROVIDER - - name: REDIS_SERVER + - name: REDIS_HOST valueFrom: configMapKeyRef: name: seafile-env - key: REDIS_SERVER + key: REDIS_HOST - name: REDIS_PORT valueFrom: configMapKeyRef: name: seafile-env key: REDIS_PORT - - name: REDIS_PASSWORD + - name: MEMCACHED_HOST valueFrom: configMapKeyRef: name: seafile-env - key: REDIS_PASSWORD - - name: MEMCACHED_SERVER - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_SERVER + key: MEMCACHED_HOST - name: MEMCACHED_PORT valueFrom: configMapKeyRef: @@ -121,12 +116,12 @@ spec: secretKeyRef: name: seafile-secret key: JWT_PRIVATE_KEY - - name: DB_PASSWORD + - name: SEAFILE_MYSQL_DB_PASSWORD valueFrom: secretKeyRef: name: seafile-secret key: SEAFILE_MYSQL_DB_PASSWORD - - name: DB_ROOT_PASSWD + - name: INIT_SEAFILE_MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: name: seafile-secret @@ -136,6 +131,11 @@ spec: secretKeyRef: name: seafile-secret key: INIT_SEAFILE_ADMIN_PASSWORD + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: seafile-secret + key: REDIS_PASSWORD volumeMounts: - name: seafile-data mountPath: /shared diff --git a/manual/repo/k8s/ce/seafile-env.yaml b/manual/repo/k8s/ce/seafile-env.yaml index 2f011b88..bbd3fab9 100644 --- a/manual/repo/k8s/ce/seafile-env.yaml +++ b/manual/repo/k8s/ce/seafile-env.yaml @@ -25,12 +25,11 @@ data: CACHE_PROVIDER: "redis" # or "memcached" ## for redis - REDIS_SERVER: "" + REDIS_HOST: "" REDIS_PORT: "6379" - REDIS_PASSWORD: "" ## for memcached - MEMCACHED_SERVER: "" + MEMCACHED_HOST: "" MEMCACHED_PORT: "11211" # Init diff --git a/manual/repo/k8s/ce/seafile-secret.yaml b/manual/repo/k8s/ce/seafile-secret.yaml index 8e949391..8ecdc537 100644 --- a/manual/repo/k8s/ce/seafile-secret.yaml +++ b/manual/repo/k8s/ce/seafile-secret.yaml @@ -15,4 +15,7 @@ data: INIT_SEAFILE_ADMIN_PASSWORD: "" ## for db - INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" \ No newline at end of file + INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" + + # for redis + REDIS_PASSWORD: "" \ No newline at end of file diff --git a/manual/repo/k8s/cluster/seafile-backend-deployment.yaml b/manual/repo/k8s/cluster/seafile-backend-deployment.yaml index e22c8e12..9ecfb9e4 100644 --- a/manual/repo/k8s/cluster/seafile-backend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-backend-deployment.yaml @@ -62,17 +62,17 @@ spec: configMapKeyRef: name: seafile-env key: SEADOC_SERVER_URL - - name: DB_HOST + - name: SEAFILE_MYSQL_DB_HOST valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_HOST - - name: DB_PORT + - name: SEAFILE_MYSQL_DB_PORT valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_PORT - - name: DB_USER + - name: SEAFILE_MYSQL_DB_USER valueFrom: configMapKeyRef: name: seafile-env @@ -92,16 +92,23 @@ spec: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME + - name: CACHE_PROVIDER + value: "memcached" + - name: MEMCACHED_HOST + valueFrom: + configMapKeyRef: + name: seafile-env + key: MEMCACHED_HOST + - name: MEMCACHED_PORT + valueFrom: + configMapKeyRef: + name: seafile-env + key: MEMCACHED_PORT - name: CLUSTER_INIT_MODE valueFrom: configMapKeyRef: name: seafile-env key: CLUSTER_INIT_MODE - - name: CLUSTER_INIT_MEMCACHED_HOST - valueFrom: - configMapKeyRef: - name: seafile-env - key: CLUSTER_INIT_MEMCACHED_HOST - name: CLUSTER_INIT_ES_HOST valueFrom: configMapKeyRef: @@ -112,11 +119,11 @@ spec: configMapKeyRef: name: seafile-env key: CLUSTER_INIT_ES_PORT - - name: INIT_S3_STORAGE_BACKEND_CONFIG + - name: USE_S3_STORAGE valueFrom: configMapKeyRef: name: seafile-env - key: INIT_S3_STORAGE_BACKEND_CONFIG + key: USE_S3_STORAGE - name: INIT_S3_COMMIT_BUCKET valueFrom: configMapKeyRef: @@ -157,6 +164,11 @@ spec: configMapKeyRef: name: seafile-env key: INIT_S3_USE_HTTPS + - name: INIT_S3_PATH_STYLE_REQUEST + valueFrom: + configMapKeyRef: + name: seafile-env + key: INIT_S3_PATH_STYLE_REQUEST - name: INIT_SEAFILE_ADMIN_EMAIL valueFrom: configMapKeyRef: @@ -167,12 +179,12 @@ spec: secretKeyRef: name: seafile-secret key: JWT_PRIVATE_KEY - - name: DB_PASSWORD + - name: SEAFILE_MYSQL_DB_PASSWORD valueFrom: secretKeyRef: name: seafile-secret key: SEAFILE_MYSQL_DB_PASSWORD - - name: DB_ROOT_PASSWD + - name: INIT_SEAFILE_MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: name: seafile-secret @@ -187,6 +199,11 @@ spec: secretKeyRef: name: seafile-secret key: INIT_SEAFILE_ADMIN_PASSWORD + - name: INIT_S3_SSE_C_KEY + valueFrom: + secretKeyRef: + name: seafile-secret + key: INIT_S3_SSE_C_KEY volumeMounts: - name: seafile-data mountPath: /shared diff --git a/manual/repo/k8s/cluster/seafile-env.yaml b/manual/repo/k8s/cluster/seafile-env.yaml index f6d94231..0b8d9e99 100644 --- a/manual/repo/k8s/cluster/seafile-env.yaml +++ b/manual/repo/k8s/cluster/seafile-env.yaml @@ -20,6 +20,13 @@ data: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME: "seafile_db" SEAFILE_MYSQL_DB_SEAHUB_DB_NAME: "seahub_db" + # for memcached + MEMCACHED_HOST: "" + MEMCACHED_PORT: "11211" + + # for s3 + USE_S3_STORAGE: "false" + # initialization (only valid in first-time deployment and CLUSTER_INIT_MODE = true) CLUSTER_INIT_MODE: "true" @@ -27,7 +34,6 @@ data: INIT_SEAFILE_ADMIN_EMAIL: "" ## for cluster basic service - CLUSTER_INIT_MEMCACHED_HOST: "" CLUSTER_INIT_ES_HOST: "" CLUSTER_INIT_ES_PORT: "9200" @@ -41,3 +47,4 @@ data: INIT_S3_AWS_REGION: "us-east-1" INIT_S3_HOST: "s3.us-east-1.amazonaws.com" INIT_S3_USE_HTTPS: "true" + INIT_S3_PATH_STYLE_REQUEST: "false" diff --git a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml index 63f7a752..bcb90b21 100644 --- a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml @@ -62,17 +62,17 @@ spec: configMapKeyRef: name: seafile-env key: SEADOC_SERVER_URL - - name: DB_HOST + - name: SEAFILE_MYSQL_DB_HOST valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_HOST - - name: DB_PORT + - name: SEAFILE_MYSQL_DB_PORT valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_PORT - - name: DB_USER + - name: SEAFILE_MYSQL_DB_USER valueFrom: configMapKeyRef: name: seafile-env @@ -92,12 +92,29 @@ spec: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME + - name: CACHE_PROVIDER + value: "memcached" + - name: MEMCACHED_HOST + valueFrom: + configMapKeyRef: + name: seafile-env + key: MEMCACHED_HOST + - name: MEMCACHED_PORT + valueFrom: + configMapKeyRef: + name: seafile-env + key: MEMCACHED_PORT + - name: USE_S3_STORAGE + valueFrom: + configMapKeyRef: + name: seafile-env + key: USE_S3_STORAGE - name: JWT_PRIVATE_KEY valueFrom: secretKeyRef: name: seafile-secret key: JWT_PRIVATE_KEY - - name: DB_PASSWORD + - name: SEAFILE_MYSQL_DB_PASSWORD valueFrom: secretKeyRef: name: seafile-secret diff --git a/manual/repo/k8s/cluster/seafile-secret.yaml b/manual/repo/k8s/cluster/seafile-secret.yaml index ef084e92..8a3587c0 100644 --- a/manual/repo/k8s/cluster/seafile-secret.yaml +++ b/manual/repo/k8s/cluster/seafile-secret.yaml @@ -18,4 +18,5 @@ data: INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" ## For S3 storage backend (only valid in INIT_S3_STORAGE_BACKEND_CONFIG = true) - INIT_S3_SECRET_KEY: "" \ No newline at end of file + INIT_S3_SECRET_KEY: "" + INIT_S3_SSE_C_KEY: "" \ No newline at end of file diff --git a/manual/repo/k8s/pro/seafile-deployment.yaml b/manual/repo/k8s/pro/seafile-deployment.yaml index 522b2368..19157405 100644 --- a/manual/repo/k8s/pro/seafile-deployment.yaml +++ b/manual/repo/k8s/pro/seafile-deployment.yaml @@ -51,17 +51,17 @@ spec: configMapKeyRef: name: seafile-env key: SEADOC_SERVER_URL - - name: DB_HOST + - name: SEAFILE_MYSQL_DB_HOST valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_HOST - - name: DB_PORT + - name: SEAFILE_MYSQL_DB_PORT valueFrom: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_PORT - - name: DB_USER + - name: SEAFILE_MYSQL_DB_USER valueFrom: configMapKeyRef: name: seafile-env @@ -81,6 +81,11 @@ spec: configMapKeyRef: name: seafile-env key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME + - name: USE_S3_STORAGE + valueFrom: + configMapKeyRef: + name: seafile-env + key: USE_S3_STORAGE - name: INIT_S3_STORAGE_BACKEND_CONFIG valueFrom: configMapKeyRef: @@ -126,6 +131,11 @@ spec: configMapKeyRef: name: seafile-env key: INIT_S3_USE_HTTPS + - name: INIT_S3_PATH_STYLE_REQUEST + valueFrom: + configMapKeyRef: + name: seafile-env + key: INIT_S3_PATH_STYLE_REQUEST - name: INIT_SEAFILE_ADMIN_EMAIL valueFrom: configMapKeyRef: @@ -136,26 +146,21 @@ spec: configMapKeyRef: name: seafile-env key: CACHE_PROVIDER - - name: REDIS_SERVER + - name: REDIS_HOST valueFrom: configMapKeyRef: name: seafile-env - key: REDIS_SERVER + key: REDIS_HOST - name: REDIS_PORT valueFrom: configMapKeyRef: name: seafile-env key: REDIS_PORT - - name: REDIS_PASSWORD + - name: MEMCACHED_HOST valueFrom: configMapKeyRef: name: seafile-env - key: REDIS_PASSWORD - - name: MEMCACHED_SERVER - valueFrom: - configMapKeyRef: - name: seafile-env - key: MEMCACHED_SERVER + key: MEMCACHED_HOST - name: MEMCACHED_PORT valueFrom: configMapKeyRef: @@ -186,6 +191,16 @@ spec: secretKeyRef: name: seafile-secret key: INIT_SEAFILE_ADMIN_PASSWORD + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: seafile-secret + key: REDIS_PASSWORD + - name: INIT_S3_SSE_C_KEY + valueFrom: + secretKeyRef: + name: seafile-secret + key: INIT_S3_SSE_C_KEY volumeMounts: - name: seafile-data mountPath: /shared diff --git a/manual/repo/k8s/pro/seafile-env.yaml b/manual/repo/k8s/pro/seafile-env.yaml index 2639588e..7b35cae6 100644 --- a/manual/repo/k8s/pro/seafile-env.yaml +++ b/manual/repo/k8s/pro/seafile-env.yaml @@ -25,20 +25,21 @@ data: CACHE_PROVIDER: "redis" # or "memcached" ## for redis - REDIS_SERVER: "" + REDIS_HOST: "" REDIS_PORT: "6379" - REDIS_PASSWORD: "" ## for memcached - MEMCACHED_SERVER: "" + MEMCACHED_HOST: "" MEMCACHED_PORT: "11211" + # for S3 + USE_S3_STORAGE: "false" + # Init ## for Seafile admin INIT_SEAFILE_ADMIN_EMAIL: "" - ## For S3 storage backend (only valid in INIT_S3_STORAGE_BACKEND_CONFIG = true) - INIT_S3_STORAGE_BACKEND_CONFIG: "false" + ## For S3 storage backend INIT_S3_COMMIT_BUCKET: "" INIT_S3_FS_BUCKET: "" INIT_S3_BLOCK_BUCKET: "" @@ -47,3 +48,4 @@ data: INIT_S3_AWS_REGION: "us-east-1" INIT_S3_HOST: "s3.us-east-1.amazonaws.com" INIT_S3_USE_HTTPS: "true" + INIT_S3_PATH_STYLE_REQUEST: "false" diff --git a/manual/repo/k8s/pro/seafile-secret.yaml b/manual/repo/k8s/pro/seafile-secret.yaml index 38124c70..af2589eb 100644 --- a/manual/repo/k8s/pro/seafile-secret.yaml +++ b/manual/repo/k8s/pro/seafile-secret.yaml @@ -18,4 +18,8 @@ data: INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "" ## For S3 storage backend (only valid in INIT_S3_STORAGE_BACKEND_CONFIG = true) - INIT_S3_SECRET_KEY: "" \ No newline at end of file + INIT_S3_SECRET_KEY: "" + INIT_S3_SSE_C_KEY: "" + + # for redis + REDIS_PASSWORD: "" \ No newline at end of file diff --git a/manual/setup/cluster_deploy_with_docker.md b/manual/setup/cluster_deploy_with_docker.md index c9def306..13a57602 100644 --- a/manual/setup/cluster_deploy_with_docker.md +++ b/manual/setup/cluster_deploy_with_docker.md @@ -65,7 +65,9 @@ Please refer [here](./system_requirements.md#seafile-cluster) for the details ab 4. Modify the [variables](../config/env.md) in `.env` (especially the terms like `<...>`). !!! tip - If you have already deployed S3 storage backend and plan to apply it to Seafile cluster, you can modify the variables in `.env` to [set them synchronously during initialization](../config/env.md#s3-storage-backend-configurations-only-valid-in-pro-edition-at-deploying-first-time). + - If you have already deployed S3 storage backend and plan to apply it to Seafile cluster, you can modify the variables in `.env` to [set them synchronously during initialization](../config/env.md#s3-storage-backend-configurations-only-valid-in-pro-edition-at-deploying-first-time). + + - Although the current Seafile cluster only supports *Memcached* as the cache, it also supports setting configurations through '. env'. **Therefore, you do not need to pay attention to the selection of `CACHE_PROVIDER`**, so you only need to correctly set `MEMCACHED_HOST` and `MEMCACHED_PORT` in `.env`. 5. Pleace license file @@ -127,10 +129,8 @@ Please refer [here](./system_requirements.md#seafile-cluster) for the details ab 8. After initailizing the cluster, the following fields can be removed in `.env` - `CLUSTER_INIT_MODE`, must be removed from .env file - - `CLUSTER_INIT_MEMCACHED_HOST` - `CLUSTER_INIT_ES_HOST` - `CLUSTER_INIT_ES_PORT` - - `INIT_S3_STORAGE_BACKEND_CONFIG` - `INIT_S3_COMMIT_BUCKET` - `INIT_S3_FS_BUCKET` - `INIT_S3_BLOCK_BUCKET` diff --git a/manual/setup/helm_chart_cluster.md b/manual/setup/helm_chart_cluster.md index 6030674f..0b5a4077 100644 --- a/manual/setup/helm_chart_cluster.md +++ b/manual/setup/helm_chart_cluster.md @@ -36,7 +36,8 @@ After installation, you need to start the k8s control plane service on each node --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='' \ --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ - --from-literal=INIT_S3_SECRET_KEY='' + --from-literal=INIT_S3_SECRET_KEY='' \ + --from-literal=INIT_S3_SSE_C_KEY='' ``` where the `JWT_PRIVATE_KEY` can be generate by `pwgen -s 40 1` diff --git a/manual/setup/helm_chart_single_node.md b/manual/setup/helm_chart_single_node.md index ef688215..9cbc6731 100644 --- a/manual/setup/helm_chart_single_node.md +++ b/manual/setup/helm_chart_single_node.md @@ -8,7 +8,7 @@ For specific environment and configuration requirements, please refer to the des For persisting data using in the docker-base deployment, `/opt/seafile-data`, is still adopted in this manual. What's more, all K8S YAML files will be placed in `/opt/seafile-k8s-yaml` (replace it when following these instructions if you would like to use another path). -By the way, we don't provide the deployment methods of basic services (e.g., **Memcached**, **MySQL** and **Elasticsearch**) and seafile-compatibility components (e.g., **SeaDoc**) for K8S in our document. If you need to install these services in K8S format, ***you can refer to the rewrite method in [this document](./k8s_single_node.md).*** +By the way, we don't provide the deployment methods of basic services (e.g., **Redis**, **MySQL** and **Elasticsearch**) and seafile-compatibility components (e.g., **SeaDoc**) for K8S in our document. If you need to install these services in K8S format, ***you can refer to the rewrite method in [this document](./k8s_single_node.md).*** ### System requirements @@ -32,7 +32,9 @@ Please refer [here](./system_requirements.md) for the details of system requirem --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='' \ --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ - --from-literal=INIT_S3_SECRET_KEY='' + --from-literal=REDIS_PASSWORD='' \ + --from-literal=INIT_S3_SECRET_KEY='' \ + --from-literal=INIT_S3_SSE_C_KEY='' ``` === "Seafile CE" @@ -97,10 +99,10 @@ After installing the chart, the Seafile pod should startup automaticlly. !!! note "About Seafile service" The default service type of Seafile is ***LoadBalancer***. You should specify K8S load balancer for Seafile or specify at least one external ip, that can be accessed from external networks. -!!! warning "Important for Pro edition" - By default, Seafile (***Pro***) will access the ***Memcached*** and ***Elasticsearch*** with the specific service name: +!!! warning "Important for deployment" + By default, Seafile will access the ***Redis*** (the default cache from Seafile 13) and ***Elasticsearch*** (Pro only) with the specific service name: - - ***Memcached***: `memcached` with port 11211 + - ***Redis***: `redis` with port 6379 - ***Elasticsearch***: `elasticsearch` with port 9200 If the above services are: diff --git a/manual/setup/setup_ce_by_docker.md b/manual/setup/setup_ce_by_docker.md index c4adece9..c04c27e6 100644 --- a/manual/setup/setup_ce_by_docker.md +++ b/manual/setup/setup_ce_by_docker.md @@ -49,10 +49,10 @@ The following fields merit particular attention: | `SEAFILE_SERVER_HOSTNAME` | Seafile server hostname or domain | (required) | | `SEAFILE_SERVER_PROTOCOL` | Seafile server protocol (http or https) | `http` | | `CACHE_PROVIDER` | The type of cache server used for Seafile. The available options are `redis` and `memcached`. Since Seafile 13, it is recommended to use `redis` as the cache service to support new features, and `memcached` will no longer be integrated into Seafile Docker by default. | `redis` | -| `REDIS_SERVER` | Redis server host | `redis` | +| `REDIS_HOST` | Redis server host | `redis` | | `REDIS_PORT` | Redis server port | `6379` | | `REDIS_PASSWORD` | Redis server password | (none) | -| `MEMCACHED_SERVER` | Memcached server host | `memcached` | +| `MEMCACHED_HOST` | Memcached server host | `memcached` | | `MEMCACHED_PORT` | Memcached server port | `11211` | | `TIME_ZONE` | Time zone | `UTC` | | `INIT_SEAFILE_ADMIN_EMAIL` | Admin username | `me@example.com` (Recommend modifications) | diff --git a/manual/setup/setup_pro_by_docker.md b/manual/setup/setup_pro_by_docker.md index 23519422..03c65197 100644 --- a/manual/setup/setup_pro_by_docker.md +++ b/manual/setup/setup_pro_by_docker.md @@ -65,39 +65,41 @@ The following fields merit particular attention: | `SEAFILE_SERVER_HOSTNAME` | Seafile server hostname or domain | (required) | | `SEAFILE_SERVER_PROTOCOL` | Seafile server protocol (http or https) | `http` | | `CACHE_PROVIDER` | The type of cache server used for Seafile. The available options are `redis` and `memcached`. Since Seafile 13, it is recommended to use `redis` as the cache service to support new features, and `memcached` will no longer be integrated into Seafile Docker by default. | `redis` | -| `REDIS_SERVER` | Redis server host | `redis` | +| `REDIS_HOST` | Redis server host | `redis` | | `REDIS_PORT` | Redis server port | `6379` | | `REDIS_PASSWORD` | Redis server password | (none) | -| `MEMCACHED_SERVER` | Memcached server host | `memcached` | +| `MEMCACHED_HOST` | Memcached server host | `memcached` | | `MEMCACHED_PORT` | Memcached server port | `11211` | | `TIME_ZONE` | Time zone | `UTC` | | `INIT_SEAFILE_ADMIN_EMAIL` | Synchronously set admin username during initialization | me@example.com | | `INIT_SEAFILE_ADMIN_PASSWORD` | Synchronously set admin password during initialization | asecret | -| `INIT_S3_STORAGE_BACKEND_CONFIG` | Whether to configure S3 storage backend synchronously during initialization (i.e., the following variables with prefix `INIT_S3_*`, for more details, please refer to [AWS S3](./setup_with_s3.md)) | false | -| `INIT_S3_COMMIT_BUCKET` | S3 storage backend commit objects bucket | (required when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | -| `INIT_S3_FS_BUCKET` | S3 storage backend fs objects bucket | (required when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | -| `INIT_S3_BLOCK_BUCKET` | S3 storage backend block objects bucket | (required when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | -| `INIT_S3_KEY_ID` | S3 storage backend key ID | (required when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | -| `INIT_S3_SECRET_KEY` | S3 storage backend secret key | (required when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | -| `INIT_S3_USE_V4_SIGNATURE` | Use the v4 protocol of S3 if enabled (only valid when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | `true` | -| `INIT_S3_AWS_REGION` | Region of your buckets (only valid when you use the AWS' S3) | `us-east-1` | -| `INIT_S3_HOST` | Host of your buckets (only valid when `INIT_S3_USE_V4_SIGNATURE` sets to `true`) | `s3.us-east-1.amazonaws.com` | -| `INIT_S3_USE_HTTPS` | Use HTTPS connections to S3 if enabled (only valid when `INIT_S3_STORAGE_BACKEND_CONFIG` sets to `true`) | `true` | -| `INIT_S3_PATH_STYLE_REQUEST` | This option asks Seafile to use URLs like `https://192.168.1.123:8080/bucketname/object` to access objects. In *Amazon S3*, the default URL format is in virtual host style, such as `https://bucketname.s3.amazonaws.com/object`. But this style relies on advanced DNS server setup. So most self-hosted storage systems only implement the path style format. | `false` | -| `INIT_S3_SSE_C_KEY` | A string of 32 characters can be generated by openssl rand -base64 24. It can be any 32-character long random string. It's required to use V4 authentication protocol and https if you enable SSE-C. | (none) | +| `USE_S3_STORAGE` | Use S3 backend storage in Seafile server | `false` | +| `S3_COMMIT_BUCKET` | S3 storage backend commit objects bucket | (required when `USE_S3_STORAGE=true`) | +| `S3_FS_BUCKET` | S3 storage backend fs objects bucket | (required when you would like to initialize with S3) | +| `S3_BLOCK_BUCKET` | S3 storage backend block objects bucket | (required when `USE_S3_STORAGE=true`) | +| `S3_KEY_ID` | S3 storage backend key ID | (required when `USE_S3_STORAGE=true`) | +| `S3_SECRET_KEY` | S3 storage backend secret key | (required when `USE_S3_STORAGE=true`) | +| `S3_AWS_REGION` | Region of your buckets | `us-east-1` | +| `S3_HOST` | Host of your buckets | `s3.us-east-1.amazonaws.com` | +| `S3_USE_HTTPS` | Use HTTPS connections to S3 if enabled | `true` | +| `S3_USE_V4_SIGNATURE` | Use the v4 protocol of S3 if enabled | `true` | +| `S3_PATH_STYLE_REQUEST` | This option asks Seafile to use URLs like `https://192.168.1.123:8080/bucketname/object` to access objects. In *Amazon S3*, the default URL format is in virtual host style, such as `https://bucketname.s3.amazonaws.com/object`. But this style relies on advanced DNS server setup. So most self-hosted storage systems only implement the path style format. | `false` | +| `S3_SSE_C_KEY` | A string of 32 characters can be generated by openssl rand -base64 24. It can be any 32-character long random string. It's required to use V4 authentication protocol and https if you enable SSE-C. | (none) | !!! success "Easier to configure S3 for Seafile and its components" - Since Seafile Pro 13.0, in order to facilitate users to deploy Seafile's related extension components and other services in the future, a section will be provided in `.env` to store the **default S3 authorization information configuration**. You can locate it with the following title bar: + Since Seafile Pro 13.0, in order to facilitate users to deploy Seafile's related extension components and other services in the future, a section will be provided in `.env` to store the **S3 authorization Configurations**. You can locate it with the following title bar: ```sh - ########################################### - # Default S3 authorization Configurations # - ########################################### + ################################### + # S3 authorization Configurations # + # (This configurations will # + # apply to all components) # + ################################### ``` The S3 authorization configuration part (i.e., ***without buckets name***) in Seafile initialization and some extension components (such as *SeaSearch*, *Metadata server*) configuration will be read from this configuration by default. - By the way, you can also manually modify the S3 configurations for specific service (this is the situation when you have selected different S3 service providers for these components). + However, please note that **Seafile currently still reads S3 configurations [through `seafile.conf`](../setup/setup_with_s3.md), and the configuration in `.env` is only used for initialization of Seafile services**. But you have to **make sure they are consistent**. To conclude, set the directory permissions of the Elasticsearch volumne: diff --git a/manual/setup/setup_with_s3.md b/manual/setup/setup_with_s3.md index 7f78cc87..255be6a4 100644 --- a/manual/setup/setup_with_s3.md +++ b/manual/setup/setup_with_s3.md @@ -17,23 +17,8 @@ The configuration options differ for different S3 storage. We'll describe the configurations in separate sections. You also need to add [memory cache configurations](../config/seafile-conf.md#cache-pro-edition-only) -!!! tip "New feature from 12.0 pro edition" - If your will deploy Seafile server in Docker, you can modify the following fields in `.env` **before starting the services**: - - ```sh - INIT_S3_STORAGE_BACKEND_CONFIG=true - INIT_S3_COMMIT_BUCKET= - INIT_S3_FS_BUCKET= - INIT_S3_BLOCK_BUCKET= - INIT_S3_KEY_ID= - INIT_S3_SECRET_KEY= - INIT_S3_USE_V4_SIGNATURE=true - INIT_S3_AWS_REGION=us-east-1 # your AWS Region - INIT_S3_HOST=s3.us-east-1.amazonaws.com # your S3 Host - INIT_S3_USE_HTTPS=true - ``` - - The above modifications will generate the same configuration file as this manual and will take effect when the service is started for the first time. +!!! tip "New feature from 13.0 pro edition" + If your will deploy Seafile server in Docker, you can specify your S3 configurations in `S3 authorization Configurations` title bar in `.env` **before starting the services** to deploy with S3 together. This operation will generate the same configuration file as this manual and will take effect when the service is started for the first time. ## How to configure S3 in Seafile Seafile configures S3 storage by adding or modifying the following section in `seafile.conf`: diff --git a/manual/setup/use_seasearch.md b/manual/setup/use_seasearch.md index 63628712..889ff362 100644 --- a/manual/setup/use_seasearch.md +++ b/manual/setup/use_seasearch.md @@ -40,6 +40,25 @@ INIT_SS_ADMIN_USER= INIT_SS_ADMIN_PASSWORD= ``` +!!! success "Easier to configure S3 for Seafile and its components" + Since Seafile Pro 13.0, in order to facilitate users to deploy Seafile's related extension components and other services in the future, a section will be provided in `.env` to store the **S3 authorization Configurations**. You can locate it with the following title bar: + + ```sh + ################################### + # S3 authorization Configurations # + # (This configurations will # + # apply to all components) # + ################################### + ``` + + The S3 authorization configuration part (i.e., ***without buckets name***) in Seafile initialization and some extension components (such as *SeaSearch*, *Metadata server*) configuration will be read from this configuration by default. + + In other words, if you deploy SeaSearch and Seafile together, and if you have deployed Seafile Pro following [here](../setup/setup_pro_by_docker.md#downloading-and-modifying-env) (and using the latest `.env`), you only need to specify the following variables in `.env` to make it work: + + ```sh + S3_SS_BUCKET= + ``` + ## Modify `seafile-server.yml` to disable `elasticSearch` service If you would like to use *SeaSearch* as the search engine, the `elasticSearch` service can be removed, which is no longer used: remove `elasticsearch.yml` in the list variable `COMPOSE_FILE` on the file `.env`. diff --git a/manual/upgrade/upgrade_docker.md b/manual/upgrade/upgrade_docker.md index cb7c004c..d078b537 100644 --- a/manual/upgrade/upgrade_docker.md +++ b/manual/upgrade/upgrade_docker.md @@ -40,65 +40,50 @@ From Seafile Docker 13.0, the `elasticsearch.yml` has separated from `seafile-se wget https://manual.seafile.com/13.0/repo/docker/pro/elasticsearch.yml ``` -5. Modify `.env`, update image version and : +5. Modify `.env`, update image version and add cache configurations: - !!! tip "About `.env`" - Normally you don't need to download the latest `.env` file during the upgrade process from Seafile 12 to 13, but we recommend that you download the latest version of the `.env` file, which is usually more concise and convenient for your subsequent configuration work. You can upgrade your `.env` file by following commands, but you must be sure to copy configurations from the old `.env` file: + !!! note "Variables change logs for `.env`" + 1. From Seafile docker 13, the configurations of database and cache can get from environment variables directly (you can define it in the `.env`). What's more, the Redis will be recommended as the primary cache server for supporting some new features (please refer the ***upgradte notes***, you can also refer to more details about Redis in Seafile Docker [here](../setup/setup_pro_by_docker.md#about-redis)) and is the default type of cache provided in Seafile 13. - 1. Download the latest `.env` file: - - === "Seafile Pro" - - ```sh - mv .env .env.bak - wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env - ``` - - === "Seafile CE" - - ```sh - mv .env .env.bak - wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env - ``` - - 2. Copy the configurations from `.env.bak` (the old `.env`) to the new `.env`. + 2. Starting from Seafile 13, When initializing Seafile, the configuration of S3, the SeaSearch component, and the newly supported Metadata server component all use unified variables (i.e., `S3_xxx`) for the authorization information of S3 in the new deployment. Please refer to the end of [the table in Seafile Pro deployment](../setup/setup_pro_by_docker.md#downloading-and-modifying-env) for details. If you plan to deploy or redeploy these components in the future, **please pay attention to changes in variable names**. + - Update image version to Seafile 13 - === "Seafile Pro" - - ```sh - COMPOSE_FILE='...,elasticsearch.yml' # add `elasticsearch.yml` if you are still using ElasticSearch - SEAFILE_IMAGE=seafileltd/seafile-pro-mc:13.0-latest - ``` - - === "Seafile CE" - - ```sh - SEAFILE_IMAGE=seafileltd/seafile-mc:13.0-latest - ``` + === "Seafile Pro" + ```sh + COMPOSE_FILE='...,elasticsearch.yml' # add `elasticsearch.yml` if you are still using ElasticSearch + SEAFILE_IMAGE=seafileltd/seafile-pro-mc:13.0-latest + ``` -5. Since Seafile 13, Redis will be recommended as the primary cache server for supporting some new features (please refer the ***upgradte notes***, you can also refer to more details about Redis in Seafile Docker [here](../setup/setup_pro_by_docker.md#about-redis)) and can be configured directly from environment variables. So you should modify `.env`, add or modify the following fields: + === "Seafile CE" - ``` - ## Cache - CACHE_PROVIDER=redis # or memcached + ```sh + SEAFILE_IMAGE=seafileltd/seafile-mc:13.0-latest + ``` - ### Redis - REDIS_SERVER=redis - REDIS_PORT=6379 - REDIS_PASSWORD= + - Add configurations for cache: - ### Memcached - MEMCACHED_SERVER=memcached - MEMCACHED_PORT=11211 - ``` + ```sh + ## Cache + CACHE_PROVIDER=redis # or memcached - Although the configurations in environment have higher priority than the configurations in config files, we recommend that you remove or modify the cache configuration in the following files to avoid ambiguity:: + ### Redis + REDIS_HOST=redis + REDIS_PORT=6379 + REDIS_PASSWORD= - - `seafile.conf`: remove the `[memcached]` section + ### Memcached + MEMCACHED_HOST=memcached + MEMCACHED_PORT=11211 + ``` - - `seahub_settings.py`: remove the key `default` in variable `CACHES` + !!! tip "Optional but recommended modifications for further configuration files" + Although the configurations in environment (i.e., `.env`) have higher priority than the configurations in config files, we recommend that you remove or modify the cache configuration in the following files to avoid ambiguity:: + + - `seafile.conf`: remove the `[memcached]` section + + - `seahub_settings.py`: remove the key `default` in variable `CACHES` 6. Start with `docker compose up -d`.