mirror of
https://github.com/haiwen/seafile-admin-docs.git
synced 2025-12-26 02:32:50 +00:00
feat: metadata server
This commit is contained in:
parent
fbe0655eee
commit
50813a40c8
|
|
@ -3,7 +3,7 @@ name: Deploy CI - 12.0
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- "13.0"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
|
@ -19,4 +19,4 @@ jobs:
|
|||
- run: cd $GITHUB_WORKSPACE
|
||||
- run: git config user.name ci-bot
|
||||
- run: git config user.email ci-bot@seafile.com
|
||||
- run: mike deploy --push -u 12.0 latest
|
||||
- run: mike deploy --push -u 13.0
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
# Introduction
|
||||
|
||||
!!! note "Seafile 13.0"
|
||||
Our document of ***Seafile 13.0*** is still in progress, **the updates of some key components have not been completed yet**. Please refer to [Seafile 12.0](https://manual.seafile.com) for more stable support.
|
||||
|
||||
Seafile is an open source cloud storage system for file sync, share and document collaboration. SeaDoc is an extension of Seafile that providing a lightweight online collaborative document feature.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,13 @@ suffix = md,txt,...
|
|||
|
||||
## If you need to modify the file list format, you can add 'suffix = md, txt, ...' configuration items to achieve.
|
||||
|
||||
# From Seafile 13.0 Redis also support using in CE, and is the default cached server
|
||||
[REDIS]
|
||||
## redis use the 0 database and "repo_update" channel
|
||||
server = 192.168.1.1
|
||||
port = 6379
|
||||
password = q!1w@#123
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
|
@ -94,12 +101,6 @@ enabled = false
|
|||
## Currently only support redis message queue
|
||||
mq_type = redis
|
||||
|
||||
[REDIS]
|
||||
## redis use the 0 database and "repo_update" channel
|
||||
server = 192.168.1.1
|
||||
port = 6379
|
||||
password = q!1w@#123
|
||||
|
||||
[AUTO DELETION]
|
||||
enabled = true # Default is false, when enabled, users can use file auto deletion feature
|
||||
interval = 86400 # The unit is second(s), the default frequency is one day, that is, it runs once a day
|
||||
|
|
|
|||
|
|
@ -55,12 +55,12 @@ expire_days = 60
|
|||
|
||||
Seafile uses a system trash, where deleted libraries will be moved to. In this way, accidentally deleted libraries can be recovered by system admin.
|
||||
|
||||
## Cache (Pro Edition Only)
|
||||
## Cache
|
||||
|
||||
Seafile Pro Edition uses memory caches in various cases to improve performance. Some session information is also saved into memory cache to be shared among the cluster nodes. Memcached or Reids can be use for memory cache.
|
||||
Seafile uses memory caches in various cases to improve performance. Some session information is also saved into memory cache to be shared among the cluster nodes. Memcached or Reids can be use for memory cache.
|
||||
|
||||
!!! tip
|
||||
Redis support is added in version 11.0. Currently only single-node Redis is supported. Redis Sentinel or Cluster is not supported yet.
|
||||
Redis support is added in version 11.0 and is the default cache server from Seafile 13.0. Currently only single-node Redis is supported. Redis Sentinel or Cluster is not supported yet.
|
||||
|
||||
=== "memcached"
|
||||
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ REST_FRAMEWORK = {
|
|||
|
||||
# Throtting whitelist used to disable throttle for certain IPs.
|
||||
# e.g. REST_FRAMEWORK_THROTTING_WHITELIST = ['127.0.0.1', '192.168.1.1']
|
||||
# Please make sure `REMOTE_ADDR` header is configured in Nginx conf according to https://manual.seafile.com/12.0/setup_binary/ce/deploy_with_nginx.html.
|
||||
# Please make sure `REMOTE_ADDR` header is configured in Nginx conf according to https://manual.seafile.com/13.0/setup_binary/ce/deploy_with_nginx.html.
|
||||
REST_FRAMEWORK_THROTTING_WHITELIST = []
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
Download the `collabora.yml`
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/collabora.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/collabora.yml
|
||||
```
|
||||
|
||||
Insert `collabora.yml` to field `COMPOSE_FILE` lists (i.e., `COMPOSE_FILE='...,collabora.yml'`) and add the relative options in `.env`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
status: new
|
||||
---
|
||||
|
||||
# Metadata server
|
||||
|
||||
Metadata server aims to provide metadata management for your libraries, so as to better understand the relevant information of your libraries.
|
||||
|
|
@ -9,43 +5,66 @@ Metadata server aims to provide metadata management for your libraries, so as to
|
|||
## Deployment
|
||||
|
||||
!!! note "Prerequisites"
|
||||
The startup of Metadata server **requires the use of *Redis* service**, but Seafile server uses *Memcached* as the cache server by default, so you must [deploy ***Redis*** for Seafile](../config/seafile-conf.md#cache-pro-edition-only) before using Metadata server, or use an external Redis service.
|
||||
The startup of Metadata server requires using ***Redis*** as the cached server (it should be the default cached server in Seafile 13.0). So you must deploy *Redis* for Seafile, then modify [`seafile.conf`](../config/seafile-conf.md#cache-pro-edition-only), [`seahub_settings.py`](https://docs.djangoproject.com/en/4.2/topics/cache/#redis) and [`seafevents.conf`](../config/seafevents-conf.md) to enable it before deploying metadata server.
|
||||
|
||||
### Download YML file
|
||||
|
||||
Please download YML file **in your `seafile-server.yml` directory** by following command:
|
||||
Please download YML file **in your `seafile-server.yml` directory** by following command:
|
||||
|
||||
=== "Deploy in the same machine with Seafile"
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/md-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/md-server.yml
|
||||
```
|
||||
|
||||
### Modify `.env` according
|
||||
=== "Standalone"
|
||||
|
||||
Normally, you don't need to set additional variables in `.env` for metadata server, because the default settings and necessary environment variables will be consistent with Seafile server (e.g., `JWT_PRIVATE_KEY`), and the metadata of libraries will be stored locally (default is `/opt/md-data`). By the way, you can also add or modify relevant environment variables in `.env` according to the information in the following table:
|
||||
```sh
|
||||
wget https://manual.seafile.com/13.0/repo/docker/metadata-server/md-server.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/metadata-server/env
|
||||
```
|
||||
|
||||
!!! warning "Important for standalone deployment"
|
||||
Starting from Seafile 13.0, metadata server supports standalone deployment, but it still needs to maintain access to the original Seafile data directory. **Please make sure that the machine where metadata server is deployed can access the directory normally**.
|
||||
|
||||
### Modify `.env`
|
||||
|
||||
!!! success "Faster configuration"
|
||||
Metadata-server docker we use an one-time configuration file, which will be generated directly through the environment variable, eliminating the need for you to repeatedly write configuration files (i.e., **no `md-server.conf`**), which will significantly improve your deployment efficiency.
|
||||
|
||||
Normally, you only need to set a `METADATA_SERVER_SECRET_KEY` for the metadata server in `.env`, and the metadata of the library will be stored locally (default is `opt/md-data`):
|
||||
|
||||
```env
|
||||
METADATA_SERVER_SECRET_KEY=<your metadata server secret key>
|
||||
MD_DATA=/opt/md-data
|
||||
```
|
||||
|
||||
!!! warning "About `METADATA_SERVER_SECRET_KEY`"
|
||||
It is used to Seafile connect to metadata server, which can be generated by `pwgen -s 40 1`. However, we **do not recommend** to use the same as the original `JWT_PRIVATE_KEY` in `.env` **for security reasons**.
|
||||
|
||||
The following table is all the related environment variables with metadata-server:
|
||||
|
||||
| Variables | Description | Required |
|
||||
| --- | --- | --- |
|
||||
| `METADATA_SERVER_SECRET_KEY` | The JWT key used to connect with Seafile server | **Required** |
|
||||
| `MD_STORAGE_TYPE` | The type of backend storage. Options: `file` (local storage), `s3`, `oss`. | Optional, default `file` |
|
||||
| `MD_DATA` | Directory where local data (only valid in `MD_STORAGE_TYPE=file`) and cache are located. | Optional, default `/opt/md-data` |
|
||||
| `SEAFILE_VOLUME` | Directory for Seafile data | Optional, default `/opt/seafile-data` |
|
||||
| `MD_MAX_CACHE_SIZE` | The maximum cache size. | Optional, default `1GB` |
|
||||
| `MD_S3_HOST` | Host of s3 backend. | Optional |
|
||||
| `MD_S3_AWS_REGION` | Region of *AWS* s3 backend. | Optional |
|
||||
| `MD_S3_USE_HTTPS` | Use https connecting to S3 backend. | Optional, default `true` |
|
||||
| `MD_S3_BUCKET` | Name of S3 bucket for storaging metadata. | **Required** |
|
||||
| `MD_S3_BUCKET` | Name of S3 bucket for storaging metadata. | **Required** when `MD_STORAGE_TYPE=s3` |
|
||||
| `MD_S3_PATH_STYLE_REQUEST` | S3 backend use path style request. | Optional, default `false` |
|
||||
| `MD_S3_KEY_ID` | S3 backend authorization key ID. | **Required** |
|
||||
| `MD_S3_KEY` | S3 backend authorization key secret. | **Required** |
|
||||
| `MD_S3_KEY_ID` | S3 backend authorization key ID. | **Required** when `MD_STORAGE_TYPE=s3` |
|
||||
| `MD_S3_KEY` | S3 backend authorization key secret. | **Required** when `MD_STORAGE_TYPE=s3` |
|
||||
| `MD_S3_USE_V4_SIGNATURE` | Use V4 signature to S3 storage backend. | Optional, default `true` |
|
||||
| `MD_S3_SSE_C_KEY` | S3 SSE-C key. | Optional |
|
||||
| `MD_OSS_HOST` | OSS backend host. | Optional |
|
||||
| `MD_OSS_REGION` | OSS backend region. | Optional |
|
||||
| `MD_OSS_BUCKET` | Name of OSS bucket for storaging metadata. | **Required** |
|
||||
| `MD_OSS_KEY_ID` | OSS backend authorization key ID. | **Required** |
|
||||
| `MD_OSS_KEY` | OSS backend authorization key secret. | **Required** |
|
||||
| `MD_OSS_BUCKET` | Name of OSS bucket for storaging metadata. | **Required** when `MD_STORAGE_TYPE=oss` |
|
||||
| `MD_OSS_KEY_ID` | OSS backend authorization key ID. | **Required** when `MD_STORAGE_TYPE=oss` |
|
||||
| `MD_OSS_KEY` | OSS backend authorization key secret. | **Required** when `MD_STORAGE_TYPE=oss` |
|
||||
| `REDIS_HOST` | Your *Redis* service host. | Optional, default `redis` |
|
||||
| `REDIS_PORT` | Your *Redis* service port. | Optional, default `6379` |
|
||||
| `REDIS_PASSWORD` | Your *Redis* access password. | Optional |
|
||||
|
|
@ -58,32 +77,49 @@ Normally, you don't need to set additional variables in `.env` for metadata serv
|
|||
|
||||
- If `MD_STORAGE_TYPE` is `s3` or `oss`, although `MD_xxx_HOST` and `MD_xxx_REGION` are marked as ***Optional***, when you use one of these two storage backends, **you must specify at least one of `MD_xxx_HOST` and `MD_xxx_REGION`, otherwise the service will fail to start**.
|
||||
|
||||
### Modify `seahub_settings.py`
|
||||
|
||||
To enable metadata server in Seafile, please add the following field in your `seahub_settings.py`:
|
||||
|
||||
=== "Deploy in the same machine with Seafile"
|
||||
```py
|
||||
ENABLE_METADATA_MANAGEMENT = True
|
||||
METADATA_SERVER_SECRET_KEY = '<your metadata server secret key> '
|
||||
METADATA_SERVER_URL = 'http://metadata-server:8084'
|
||||
```
|
||||
=== "Standalone"
|
||||
```py
|
||||
ENABLE_METADATA_MANAGEMENT = True
|
||||
METADATA_SERVER_SECRET_KEY = '<your metadata server secret key> '
|
||||
METADATA_SERVER_URL = 'http://<your metadata-server host>:8084'
|
||||
```
|
||||
|
||||
## Start service
|
||||
|
||||
You can use following command to start metadata server:
|
||||
You can use following command to start metadata server (and the Seafile service also have to restart):
|
||||
|
||||
```sh
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
!!! success
|
||||
If the container startups normally, the follow message you can get from `docker logs -f metadata-server`:
|
||||
```log
|
||||
[md-server] [2025-01-24 06:23:44] [INFO] Environment variable validity checked
|
||||
[md-server] [2025-01-24 06:23:44] [INFO] Database initialization completed
|
||||
[md-server] [2025-01-24 06:23:44] [INFO] Configuration file generated
|
||||
[md-server] [2025-01-24 06:45:17] [INFO] starting seaf-md-server
|
||||
```
|
||||
|
||||
!!! note "About listening port of Metadata server"
|
||||
|
||||
By default, the Metadata server listens on port 8084. You can modify it by specifying `MD_PORT` in .env. At the same time, due to security reasons, this port is not open to the external network. If you need to open this port, you need to modify `md-server.yml` to uncomment the following:
|
||||
If the container startups normally, the message you can get from the following logs
|
||||
|
||||
```yml
|
||||
services:
|
||||
metadata-server:
|
||||
...
|
||||
ports:
|
||||
- ${MD_PORT:-8084}:${MD_PORT:-8084}
|
||||
...
|
||||
```
|
||||
- `docker logs -f metadata-server`:
|
||||
```log
|
||||
[md-server] [2025-01-24 06:23:44] [INFO] Environment variable validity checked
|
||||
[md-server] [2025-01-24 06:23:44] [INFO] Database initialization completed
|
||||
[md-server] [2025-01-24 06:23:44] [INFO] Configuration file generated
|
||||
```
|
||||
- `$MD_DATA/log/seaf-md-server.log`
|
||||
```log
|
||||
[2025-02-23 06:07:57] [INFO] starting seaf-md-server
|
||||
```
|
||||
- `$SEAFILE_VOLUME/seafile/logs/seafevents.log`
|
||||
```log
|
||||
[2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.index_worker:134 refresh_lock refresh_thread Starting refresh locks
|
||||
[2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.slow_task_handler:61 worker_handler slow_task_handler_thread_0 starting update metadata work
|
||||
[2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.slow_task_handler:61 worker_handler slow_task_handler_thread_1 starting update metadata work
|
||||
[2025-02-23 06:08:05] [INFO] seafevents.repo_metadata.slow_task_handler:61 worker_handler slow_task_handler_thread_2 starting update metadata work
|
||||
```
|
||||
`
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ The notification server uses websocket protocol and maintains a two-way communic
|
|||
Since Seafile 12.0, we use a separate Docker image to deploy the notification server. First download `notification-server.yml` to Seafile directory:
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/notification-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/notification-server.yml
|
||||
```
|
||||
|
||||
Modify `.env`, and insert `notification-server.yml` into `COMPOSE_FILE`:
|
||||
|
|
@ -68,8 +68,8 @@ If you enable [clustering](../setup_binary/cluster_deployment.md), You need to d
|
|||
Download `.env` and `notification-server.yml` to notification server directory:
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/notification-server/standalone/notification-server.yml
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/notification-server/standalone/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/notification-server/standalone/notification-server.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/notification-server/standalone/env
|
||||
```
|
||||
|
||||
Then modify the `.env` file according to your environment. The following fields are needed to be modified:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Seafile supports [OnlyOffice](https://www.onlyoffice.com/) to view/edit office f
|
|||
Download the `onlyoffice.yml`
|
||||
|
||||
```shell
|
||||
wget https://manual.seafile.com/12.0/repo/docker/onlyoffice.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/onlyoffice.yml
|
||||
```
|
||||
|
||||
insert `onlyoffice.yml` into `COMPOSE_FILE` list (i.e., `COMPOSE_FILE='...,onlyoffice.yml'`), and add the following configurations of onlyoffice in `.env` file.
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ The easiest way to deployment SeaDoc is to deploy it with Seafile server on the
|
|||
1. Download the `seadoc.yml` to `/opt/seafile`
|
||||
|
||||
```shell
|
||||
wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml
|
||||
```
|
||||
|
||||
2. Modify `.env`, and insert `seadoc.yml` into `COMPOSE_FILE`, and enable SeaDoc server
|
||||
|
|
@ -69,8 +69,8 @@ If you deploy Seafile in a cluster or if you deploy Seafile with binary package,
|
|||
1. Download and modify the `.env` and `seadoc.yml` files to directory `/opt/seadoc`
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/seadoc/1.0/standalone/seadoc.yml
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/seadoc/1.0/standalone/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/seadoc/1.0/standalone/seadoc.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/seadoc/1.0/standalone/env
|
||||
```
|
||||
|
||||
2. Then modify the `.env` file according to your environment. The following fields are needed to be modified:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ If your Seafile server is deployed using [Docker](../setup/setup_pro_by_docker.m
|
|||
Download `clamav.yml`
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/pro/clamav.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/pro/clamav.yml
|
||||
```
|
||||
|
||||
Modify `.env`, insert `clamav.yml` to field `COMPOSE_FILE`
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ services:
|
|||
#ports:
|
||||
# - ${MD_PORT:-8084}:${MD_PORT:-8084}
|
||||
environment:
|
||||
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
|
||||
- JWT_PRIVATE_KEY=${METADATA_SERVER_SECRET_KEY:?Variable is not set or empty}
|
||||
- SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
|
||||
- SEAFILE_MYSQL_DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
|
||||
- SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
# metadata server basic variables
|
||||
MD_IMAGE=seafileltd/metadata-server:latest
|
||||
JWT_PRIVATE_KEY=
|
||||
MD_PORT=8084 # not recommond to modify
|
||||
MD_LOG_LEVEL=info
|
||||
MD_MAX_CACHE_SIZE=1GB
|
||||
MD_STORAGE_TYPE=file
|
||||
MD_DATA=/opt/md-data
|
||||
SEAFILE_VOLUME=/opt/seafile-data
|
||||
|
||||
# for MySQL
|
||||
SEAFILE_MYSQL_DB_HOST=
|
||||
SEAFILE_MYSQL_DB_PORT=3306
|
||||
SEAFILE_MYSQL_DB_USER=seafile
|
||||
SEAFILE_MYSQL_DB_PASSWORD=
|
||||
SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db
|
||||
SEAFILE_LOG_TO_STDOUT=false
|
||||
|
||||
#
|
||||
MD_S3_HOST=
|
||||
MD_S3_AWS_REGION=
|
||||
MD_S3_USE_HTTPS=true
|
||||
MD_S3_BUCKET=
|
||||
MD_S3_PATH_STYLE_REQUEST=false
|
||||
MD_S3_KEY_ID=
|
||||
MD_S3_KEY=
|
||||
MD_S3_USE_V4_SIGNATURE=true
|
||||
MD_S3_SSE_C_KEY=
|
||||
|
||||
#
|
||||
MD_OSS_HOST=
|
||||
MD_OSS_REGION=
|
||||
MD_OSS_BUCKET=
|
||||
MD_OSS_KEY_ID=
|
||||
MD_OSS_KEY=
|
||||
|
||||
# for Redis
|
||||
REDIS_HOST=
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
services:
|
||||
metadata-server:
|
||||
image: ${MD_IMAGE:-seafileltd/metadata-server:latest}
|
||||
container_name: metadata-server
|
||||
volumes:
|
||||
- ${MD_DATA:-/opt/md-data}:/data
|
||||
- ${SEAFILE_VOLUME:-/opt/seafile-data}/seafile:/opt/seafile
|
||||
ports:
|
||||
- ${MD_PORT:-8084}:${MD_PORT:-8084}
|
||||
environment:
|
||||
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
|
||||
- SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:?Variable is not set or empty}
|
||||
- SEAFILE_MYSQL_DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
|
||||
- SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
|
||||
- SEAFILE_MYSQL_DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
|
||||
- SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
|
||||
- SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
|
||||
- MD_PORT=${MD_PORT:-8084}
|
||||
- MD_LOG_LEVEL=${MD_LOG_LEVEL:-info}
|
||||
- MD_MAX_CACHE_SIZE=${MD_MAX_CACHE_SIZE:-1GB}
|
||||
- MD_STORAGE_TYPE=${MD_STORAGE_TYPE:-file}
|
||||
- MD_S3_HOST=${MD_S3_HOST:-}
|
||||
- MD_S3_AWS_REGION=${MD_S3_AWS_REGION:-}
|
||||
- MD_S3_USE_HTTPS=${MD_S3_USE_HTTPS:-true}
|
||||
- MD_S3_BUCKET=${MD_S3_BUCKET:-}
|
||||
- MD_S3_PATH_STYLE_REQUEST=${MD_S3_PATH_STYLE_REQUEST:-false}
|
||||
- MD_S3_KEY_ID=${MD_S3_KEY_ID:-}
|
||||
- MD_S3_KEY=${MD_S3_KEY:-}
|
||||
- MD_S3_USE_V4_SIGNATURE=${MD_S3_USE_V4_SIGNATURE:-true}
|
||||
- MD_S3_SSE_C_KEY=${MD_S3_SSE_C_KEY:-}
|
||||
- MD_OSS_HOST=${MD_OSS_HOST:-}
|
||||
- MD_OSS_REGION=${MD_OSS_REGION:-}
|
||||
- MD_OSS_BUCKET=${MD_OSS_BUCKET:-}
|
||||
- MD_OSS_KEY_ID=${MD_OSS_KEY_ID:-}
|
||||
- MD_OSS_KEY=${MD_OSS_KEY:-}
|
||||
- REDIS_HOST=${REDIS_HOST:?Variable is not set or empty}
|
||||
- REDIS_PORT=${REDIS_PORT:-6379}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
|
|
@ -69,7 +69,7 @@ SEASEARCH_IMAGE=seafileltd/seasearch:latest
|
|||
SS_STORAGE_TYPE=disk # disk (local storage), s3, oss
|
||||
|
||||
### Local storage mode
|
||||
SS_DATA_PATH=./data # Persistent storage path
|
||||
SS_DATA_PATH=/opt/seasearch-data # Persistent storage path
|
||||
SS_MAX_OBJ_CACHE_SIZE=10GB
|
||||
|
||||
### S3 mode
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ Please refer [here](./system_requirements.md#seafile-cluster) for the details ab
|
|||
3. Download the `seafile-server.yml` and `.env`
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/cluster/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/cluster/seafile-server.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/cluster/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/cluster/seafile-server.yml
|
||||
```
|
||||
|
||||
4. Modify the [variables](../config/env.md) in `.env` (especially the terms like `<...>`).
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ After installation, you need to start the k8s control plane service on each node
|
|||
```sh
|
||||
mkdir -p /opt/seafile-k8s-yaml
|
||||
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-backend-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-persistentvolume.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-service.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-env.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-secret.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-backend-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-persistentvolume.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-persistentvolumeclaim.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-service.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-env.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-secret.yaml
|
||||
```
|
||||
|
||||
|
||||
|
|
@ -135,7 +135,7 @@ Finally you can use the `tar -zcvf` and `tar -zxvf` commands to package the enti
|
|||
1. Download frontend service's YAML by:
|
||||
|
||||
```sh
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/cluster/seafile-frontend-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/cluster/seafile-frontend-deployment.yaml
|
||||
```
|
||||
|
||||
2. Modify `seafile-env.yaml`, and set `CLUSTER_INIT_MODE` to `false` (i.e., disable initialization mode)
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ By the way, we don't provide the deployment methods of basic services (e.g., **M
|
|||
```sh
|
||||
mkdir -p /opt/seafile-k8s-yaml
|
||||
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-persistentvolume.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-persistentvolumeclaim.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-service.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-env.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/pro/seafile-secret.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-persistentvolume.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-persistentvolumeclaim.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-service.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-env.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/pro/seafile-secret.yaml
|
||||
```
|
||||
|
||||
=== "Community edition"
|
||||
|
|
@ -34,12 +34,12 @@ By the way, we don't provide the deployment methods of basic services (e.g., **M
|
|||
```sh
|
||||
mkdir -p /opt/seafile-k8s-yaml
|
||||
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-persistentvolume.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-persistentvolumeclaim.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-service.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-env.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/12.0/repo/k8s/ce/seafile-secret.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-deployment.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-persistentvolume.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-persistentvolumeclaim.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-service.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-env.yaml
|
||||
wget -P /opt/seafile-k8s-yaml https://manual.seafile.com/13.0/repo/k8s/ce/seafile-secret.yaml
|
||||
```
|
||||
|
||||
In here we suppose you download the YAML files in `/opt/seafile-k8s-yaml`, which mainly include about:
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
3. Download the `.env` and `seafile-server.yml` of Seafile Pro.
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml
|
||||
```
|
||||
|
||||
## Migrate
|
||||
|
|
|
|||
|
|
@ -65,17 +65,17 @@ You have to download the latest docker-compose files (i.e., series of `.yml` and
|
|||
=== "Seafile CE"
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/ce/seafile-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/caddy.yml
|
||||
```
|
||||
|
||||
=== "Seafile Pro"
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/caddy.yml
|
||||
```
|
||||
|
||||
Then modify the `.env` according to your configurations.
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ mkdir /opt/seafile
|
|||
cd /opt/seafile
|
||||
|
||||
# Seafile CE 12.0
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/ce/seafile-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/caddy.yml
|
||||
|
||||
nano .env
|
||||
```
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ mkdir /opt/seafile
|
|||
cd /opt/seafile
|
||||
|
||||
# Seafile PE 12.0
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/seadoc.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/caddy.yml
|
||||
|
||||
nano .env
|
||||
```
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ Modify `nginx.conf` and add reverse proxy for services ***seafile*** and ***sead
|
|||
}
|
||||
|
||||
location /socket.io {
|
||||
proxy_pass http://127.0.0.1:8888/;
|
||||
proxy_pass http://127.0.0.1:8888;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
SeaSearch service is currently mainly deployed via docker. We have integrated it into the relevant docker-compose file. You only need to download it to the same directory as `seafile-server.yml`:
|
||||
|
||||
```sh
|
||||
wget https://manual.seafile.com/12.0/repo/docker/pro/seasearch.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/pro/seasearch.yml
|
||||
```
|
||||
|
||||
## Modify `.env`
|
||||
|
|
@ -47,8 +47,15 @@ If you would like to use *SeaSearch* as the search engine, the `elasticSearch` s
|
|||
|
||||
```yml
|
||||
services:
|
||||
#elasticsearch: # remove or note the whole `elasticsearch` section
|
||||
#...
|
||||
seafile:
|
||||
...
|
||||
depends_on:
|
||||
...
|
||||
#elasticsearch: # remove or note the `elasticsearch` service Dependency
|
||||
#condition: service_started
|
||||
|
||||
#elasticsearch: # remove or note the whole `elasticsearch` section
|
||||
#...
|
||||
```
|
||||
|
||||
## Modify `seafevents.conf`
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ In general, to upgrade a cluster, you need:
|
|||
2. Download the docker-compose files for *Seafile 12*
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/cluster/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/cluster/seafile-server.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/cluster/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/cluster/seafile-server.yml
|
||||
```
|
||||
|
||||
3. Modify `.env`:
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ Download [.env](../docker/ce/env), [seafile-server.yml](../docker/ce/seafile-ser
|
|||
=== "Seafile community edition"
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/ce/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/ce/seafile-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/caddy.yml
|
||||
```
|
||||
The following fields merit particular attention:
|
||||
|
||||
|
|
@ -49,9 +49,9 @@ Download [.env](../docker/ce/env), [seafile-server.yml](../docker/ce/seafile-ser
|
|||
=== "Seafile pro edition"
|
||||
|
||||
```sh
|
||||
wget -O .env https://manual.seafile.com/12.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/12.0/repo/docker/pro/seafile-server.yml
|
||||
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml
|
||||
wget -O .env https://manual.seafile.com/13.0/repo/docker/pro/env
|
||||
wget https://manual.seafile.com/13.0/repo/docker/pro/seafile-server.yml
|
||||
wget https://manual.seafile.com/13.0/repo/docker/caddy.yml
|
||||
```
|
||||
The following fields merit particular attention:
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ nav:
|
|||
- Extra Seafile components:
|
||||
- SeaDoc Integration: extension/setup_seadoc.md
|
||||
- Notification Server: extension/notification-server.md
|
||||
#- Metadata Server: extension/metadata-server.md
|
||||
- Metadata Server: extension/metadata-server.md
|
||||
- WebDAV extension: extension/webdav.md
|
||||
- FUSE extension: extension/fuse.md
|
||||
- Online Office:
|
||||
|
|
|
|||
Loading…
Reference in New Issue