Merge pull request #567 from haiwen/add_some_env_for_md_server

add MD_FILE_COUNT_LIMIT
This commit is contained in:
Daniel Pan 2025-07-08 15:26:05 +08:00 committed by GitHub
commit 97d14cdcc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 54 additions and 2 deletions

View File

@ -116,6 +116,10 @@ For configurations about Metadata server in `.env`, please refer [here](../exten
- `NOTIFICATION_SERVER_URL`: Used to do the connection between client (i.e., user's browser) and notification server. Default is `https://seafile.example.com/notification`.
- `INNER_NOTIFICATION_SERVER_URL`: Used to do the connection between Seafile server and notification server. Default is `http://notification-server:8083`.
## Metadata server
- `MD_FILE_COUNT_LIMIT`: The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. Default is `100000`.
## 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`***.

View File

@ -85,6 +85,8 @@ The following table is all the related environment variables with Metadata serve
| `REDIS_PASSWORD` | Your *Redis* access password. | Optional |
| `MD_STORAGE_TYPE` | Where the metadata storage in. Available options are `disk` (local storage) and `s3` | `disk` |
| `S3_MD_BUCKET` | Your S3 bucket name for the bucket storing metadata | Required when using S3 (`MD_STORAGE_TYPE=s3`) |
| `MD_CHECK_UPDATE_INTERVAL` | The interval for updating metadata of the repository | `30m` |
| `MD_FILE_COUNT_LIMIT` | The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. | `100000` |
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) (**the buckets name for Seafile are also needed**).

View File

@ -79,3 +79,6 @@ NOTIFICATION_SERVER_URL=
ENABLE_SEAFILE_AI=false
SEAFILE_AI_LLM_URL=
SEAFILE_AI_LLM_KEY=
## Metadata server
MD_FILE_COUNT_LIMIT=100000

View File

@ -78,6 +78,7 @@ services:
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}
- SEAFILE_AI_SERVER_URL=${SEAFILE_AI_SERVER_URL:-http://seafile-ai:8888}
- SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000}
labels:
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
caddy.reverse_proxy: "{{upstreams 80}}"

View File

@ -56,6 +56,9 @@ INNER_NOTIFICATION_SERVER_URL=$NOTIFICATION_SERVER_URL
ENABLE_SEAFILE_AI=false
SEAFILE_AI_SERVER_URL=
## Metadata server
MD_FILE_COUNT_LIMIT=100000
######################################
# Initial variables #
# (Only valid in first-time startup) #

View File

@ -55,3 +55,4 @@ services:
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}
- SEAFILE_AI_SERVER_URL=$SEAFILE_AI_SERVER_URL
- SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000}

View File

@ -18,6 +18,8 @@ services:
- MD_PORT=${MD_PORT:-8084}
- MD_LOG_LEVEL=${MD_LOG_LEVEL:-info}
- MD_MAX_CACHE_SIZE=${MD_MAX_CACHE_SIZE:-1GB}
- MD_CHECK_UPDATE_INTERVAL=${MD_CHECK_UPDATE_INTERVAL:-30m}
- MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000}
- SEAF_SERVER_STORAGE_TYPE=${SEAF_SERVER_STORAGE_TYPE:-}
- MD_STORAGE_TYPE=${MD_STORAGE_TYPE:-disk}
- S3_COMMIT_BUCKET=${S3_COMMIT_BUCKET:-}

View File

@ -33,4 +33,8 @@ S3_SSE_C_KEY=
# for Redis
REDIS_HOST=
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_PASSWORD=
# for md-server configuration
MD_CHECK_UPDATE_INTERVAL=30m
MD_FILE_COUNT_LIMIT=100000

View File

@ -18,6 +18,8 @@ services:
- MD_PORT=${MD_PORT:-8084}
- MD_LOG_LEVEL=${MD_LOG_LEVEL:-info}
- MD_MAX_CACHE_SIZE=${MD_MAX_CACHE_SIZE:-1GB}
- MD_CHECK_UPDATE_INTERVAL=${MD_CHECK_UPDATE_INTERVAL:-30m}
- MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000}
- SEAF_SERVER_STORAGE_TYPE=${SEAF_SERVER_STORAGE_TYPE:-}
- MD_STORAGE_TYPE=${MD_STORAGE_TYPE:-disk}
- S3_COMMIT_BUCKET=${S3_COMMIT_BUCKET:-}

View File

@ -121,3 +121,6 @@ NOTIFICATION_SERVER_URL=
ENABLE_SEAFILE_AI=false
SEAFILE_AI_LLM_URL=
SEAFILE_AI_LLM_KEY=
## Metadata server
MD_FILE_COUNT_LIMIT=100000

View File

@ -90,6 +90,7 @@ services:
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}
- SEAFILE_AI_SERVER_URL=${SEAFILE_AI_SERVER_URL:-http://seafile-ai:8888}
- SEAFILE_AI_SECRET_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- MD_FILE_COUNT_LIMIT=${MD_FILE_COUNT_LIMIT:-100000}
labels:
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
caddy.reverse_proxy: "{{upstreams 80}}"

View File

@ -136,6 +136,11 @@ spec:
configMapKeyRef:
name: seafile-env
key: SEAFILE_AI_SERVER_URL
- name: MD_FILE_COUNT_LIMIT
valueFrom:
configMapKeyRef:
name: seafile-env
key: MD_FILE_COUNT_LIMIT
- name: JWT_PRIVATE_KEY
valueFrom:
secretKeyRef:

View File

@ -42,6 +42,9 @@ data:
ENABLE_SEAFILE_AI: "false"
SEAFILE_AI_SERVER_URL: "<required when ENABLE_SEAFILE_AI=true>"
# Matedata server
MD_FILE_COUNT_LIMIT: "100000"
# Init
## for Seafile admin
INIT_SEAFILE_ADMIN_EMAIL: "<Seafile admin's email>"

View File

@ -62,3 +62,6 @@ data:
# Seafile AI
ENABLE_SEAFILE_AI: "false"
SEAFILE_AI_SERVER_URL: "<required when ENABLE_SEAFILE_AI=true>"
# Matedata server
MD_FILE_COUNT_LIMIT: "100000"

View File

@ -192,6 +192,11 @@ spec:
configMapKeyRef:
name: seafile-env
key: SEAFILE_AI_SERVER_URL
- name: MD_FILE_COUNT_LIMIT
valueFrom:
configMapKeyRef:
name: seafile-env
key: MD_FILE_COUNT_LIMIT
- name: JWT_PRIVATE_KEY
valueFrom:
secretKeyRef:

View File

@ -186,6 +186,11 @@ spec:
configMapKeyRef:
name: seafile-env
key: SEAFILE_AI_SERVER_URL
- name: MD_FILE_COUNT_LIMIT
valueFrom:
configMapKeyRef:
name: seafile-env
key: MD_FILE_COUNT_LIMIT
- name: JWT_PRIVATE_KEY
valueFrom:
secretKeyRef:

View File

@ -54,6 +54,9 @@ data:
ENABLE_SEAFILE_AI: "false"
SEAFILE_AI_SERVER_URL: "<required when ENABLE_SEAFILE_AI=true>"
# Matedata server
MD_FILE_COUNT_LIMIT: "100000"
# Init
## for Seafile admin
INIT_SEAFILE_ADMIN_EMAIL: "<Seafile admin's email>"

View File

@ -58,7 +58,8 @@ The following fields merit particular attention:
| `MEMCACHED_PORT` | Memcached server port | `11211` |
| `TIME_ZONE` | Time zone | `UTC` |
| `ENABLE_NOTIFICATION_SERVER` | Enable (`true`) or disable (`false`) notification feature for Seafile | `false` |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) |
| `MD_FILE_COUNT_LIMIT` | (only valid when deployed [metadata server](../extension/metadata-server.md)). The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. | `100000` |
| `INIT_SEAFILE_ADMIN_EMAIL` | Admin username | `me@example.com` (Recommend modifications) |
| `INIT_SEAFILE_ADMIN_PASSWORD` | Admin password | `asecret` (Recommend modifications) |
| `NON_ROOT` | Run Seafile container without a root user | `false` |

View File

@ -89,6 +89,7 @@ The following fields merit particular attention:
| `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) |
| `ENABLE_NOTIFICATION_SERVER` | Enable (`true`) or disable (`false`) notification feature for Seafile | `false` |
| `NOTIFICATION_SERVER_URL` | The [notification server](../extension/notification-server.md) url | (none) |
| `MD_FILE_COUNT_LIMIT` | (only valid when deployed [metadata server](../extension/metadata-server.md)). The maximum number of files in a repository that the metadata feature allows. If the number of files in a repository exceeds this value, the metadata management function will not be enabled for the repository. For a repository with metadata management enabled, if the number of records in it reaches this value but there are still some files that are not recorded in metadata server, the metadata management of the unrecorded files will be skipped. | `100000` |
| `NON_ROOT` | Run Seafile container without a root user | `false` |
!!! success "Easier to configure S3 for Seafile and its components"