perf: docker compose resource files (#497)
Some checks failed
Deploy CI - 13.0 / deploy (push) Has been cancelled

* 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
This commit is contained in:
Huang Junxiang 2025-03-31 18:06:02 +08:00 committed by GitHub
parent 6046306fb3
commit 9e80a20a8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
30 changed files with 360 additions and 312 deletions

View File

@ -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

View File

@ -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=<your s3 bucket name for Metadata>
```
```sh
MD_IMAGE=seafileltd/seafile-md-server:latest
MD_STORAGE_TYPE=s3
MD_S3_BUCKET=<your md data bucket name>
MD_S3_HOST=<your s3 host>
MD_S3_AWS_REGION=<your aws region> # only needed for AWS
MD_S3_USE_HTTPS=true
MD_S3_PATH_STYLE_REQUEST=false
MD_S3_KEY_ID=<your s3 key id>
MD_S3_KEY=<your s3 key>
MD_S3_USE_V4_SIGNATURE=true
MD_S3_SSE_C_KEY=
S3_MD_BUCKET=<your md data bucket name>
```
#### 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`

View File

@ -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
######################################

View File

@ -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}

View File

@ -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=<your 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=<your memcached host>
CLUSTER_INIT_ES_HOST=<your elasticsearch server 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=<your-key-id>
INIT_S3_SECRET_KEY=<your-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

View File

@ -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:-}

View File

@ -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:-}

View File

@ -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=

View File

@ -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:-}

View File

@ -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=<your-key-id>
DEFAULT_S3_SECRET_KEY=<your-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=<your commit bucket name>
S3_FS_BUCKET=<your fs bucket name>
S3_BLOCK_BUCKET=<your block bucket name>
######################################
# 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=<your commit bucket name>
INIT_S3_FS_BUCKET=<your fs bucket name>
INIT_S3_BLOCK_BUCKET=<your block bucket name>
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=<your seasearch bucket name>
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=<your seasearch bucket name>
### 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=<your metadata bucket name>
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=<your metadata bucket name>
###################################
# S3 authorization Configurations #
# (This configurations will #
# apply to all components) #
###################################
S3_KEY_ID=<your-key-id>
S3_SECRET_KEY=<your-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=

View File

@ -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}}"

View File

@ -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}

View File

@ -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

View File

@ -25,12 +25,11 @@ data:
CACHE_PROVIDER: "redis" # or "memcached"
## for redis
REDIS_SERVER: "<your redis host>"
REDIS_HOST: "<your redis host>"
REDIS_PORT: "6379"
REDIS_PASSWORD: ""
## for memcached
MEMCACHED_SERVER: "<your memcached host>"
MEMCACHED_HOST: "<your memcached host>"
MEMCACHED_PORT: "11211"
# Init

View File

@ -15,4 +15,7 @@ data:
INIT_SEAFILE_ADMIN_PASSWORD: "<Seafile admin's password>"
## for db
INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "<MySQL user root's password>"
INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "<MySQL user root's password>"
# for redis
REDIS_PASSWORD: ""

View File

@ -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

View File

@ -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: "<your Memcached server 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: "<Seafile admin's email>"
## for cluster basic service
CLUSTER_INIT_MEMCACHED_HOST: "<your Memcached server host>"
CLUSTER_INIT_ES_HOST: "<your ElasticSearch server 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"

View File

@ -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

View File

@ -18,4 +18,5 @@ data:
INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "<MySQL user root's password>"
## For S3 storage backend (only valid in INIT_S3_STORAGE_BACKEND_CONFIG = true)
INIT_S3_SECRET_KEY: ""
INIT_S3_SECRET_KEY: ""
INIT_S3_SSE_C_KEY: ""

View File

@ -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

View File

@ -25,20 +25,21 @@ data:
CACHE_PROVIDER: "redis" # or "memcached"
## for redis
REDIS_SERVER: "<your redis host>"
REDIS_HOST: "<your redis host>"
REDIS_PORT: "6379"
REDIS_PASSWORD: ""
## for memcached
MEMCACHED_SERVER: "<your memcached host>"
MEMCACHED_HOST: "<your memcached host>"
MEMCACHED_PORT: "11211"
# for S3
USE_S3_STORAGE: "false"
# Init
## for Seafile admin
INIT_SEAFILE_ADMIN_EMAIL: "<Seafile admin's 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"

View File

@ -18,4 +18,8 @@ data:
INIT_SEAFILE_MYSQL_ROOT_PASSWORD: "<MySQL user root's password>"
## For S3 storage backend (only valid in INIT_S3_STORAGE_BACKEND_CONFIG = true)
INIT_S3_SECRET_KEY: ""
INIT_S3_SECRET_KEY: ""
INIT_S3_SSE_C_KEY: ""
# for redis
REDIS_PASSWORD: ""

View File

@ -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`

View File

@ -36,7 +36,8 @@ After installation, you need to start the k8s control plane service on each node
--from-literal=SEAFILE_MYSQL_DB_PASSWORD='<required>' \
--from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \
--from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>' \
--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`

View File

@ -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='<required>' \
--from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \
--from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>' \
--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:

View File

@ -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) |

View File

@ -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:

View File

@ -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=<your-commit-objects>
INIT_S3_FS_BUCKET=<your-fs-objects>
INIT_S3_BLOCK_BUCKET=<your-block-objects>
INIT_S3_KEY_ID=<your-key-id>
INIT_S3_SECRET_KEY=<your-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`:

View File

@ -40,6 +40,25 @@ INIT_SS_ADMIN_USER=<admin-username>
INIT_SS_ADMIN_PASSWORD=<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=<your s3 bucket name for SeaSearch>
```
## 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`.

View File

@ -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`.