Episode 19: Nextcloud AIO, OpenCloud and Seafile measured with the same test data on the same server
This commit is contained in:
parent
76a3132a17
commit
145d318452
70 changed files with 3296 additions and 0 deletions
15
filesync/compose/nextcloud/aio-docker-run.sh
Normal file
15
filesync/compose/nextcloud/aio-docker-run.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
# Nextcloud All-in-One, Befehl aus github.com/nextcloud/all-in-one readme.md (Schritt 3), im Lab mit -d gestartet.
|
||||
# Danach https://<server-ip>:8080 im Browser öffnen: der ERSTE Besucher sieht die Passphrase.
|
||||
# Empfehlung aus dem Lab: Port 8080 per Firewall auf die eigene IP beschränken, bis die Einrichtung durch ist.
|
||||
sudo docker run -d \
|
||||
--init \
|
||||
--sig-proxy=false \
|
||||
--name nextcloud-aio-mastercontainer \
|
||||
--restart always \
|
||||
--publish 80:80 \
|
||||
--publish 8080:8080 \
|
||||
--publish 8443:8443 \
|
||||
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
ghcr.io/nextcloud-releases/all-in-one:latest
|
||||
76
filesync/compose/opencloud/docker-compose.yml
Normal file
76
filesync/compose/opencloud/docker-compose.yml
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
---
|
||||
services:
|
||||
opencloud:
|
||||
# renovate: depName=opencloudeu/opencloud-rolling
|
||||
image: ${OC_DOCKER_IMAGE:-opencloudeu/opencloud-rolling}:${OC_DOCKER_TAG:-8.1.0}
|
||||
# changelog: https://github.com/opencloud-eu/opencloud/tree/main/changelog
|
||||
# release notes: https://docs.opencloud.eu/opencloud_release_notes.html
|
||||
user: ${OC_CONTAINER_UID_GID:-1000:1000}
|
||||
networks:
|
||||
opencloud-net:
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
# run opencloud init to initialize a configuration file with random secrets
|
||||
# it will fail on subsequent runs, because the config file already exists
|
||||
# therefore we ignore the error and then start the opencloud server
|
||||
command: ["-c", "opencloud init || true; opencloud server"]
|
||||
environment:
|
||||
# enable services that are not started automatically
|
||||
OC_ADD_RUN_SERVICES: ${START_ADDITIONAL_SERVICES}
|
||||
OC_URL: https://${OC_DOMAIN:-cloud.opencloud.test}${TRAEFIK_PORT_HTTPS:+:}${TRAEFIK_PORT_HTTPS:-}
|
||||
OC_LOG_LEVEL: ${LOG_LEVEL:-info}
|
||||
OC_LOG_COLOR: "${LOG_PRETTY:-false}"
|
||||
OC_LOG_PRETTY: "${LOG_PRETTY:-false}"
|
||||
# do not use SSL between the reverse proxy and OpenCloud
|
||||
PROXY_TLS: "false"
|
||||
# INSECURE: needed if OpenCloud / reverse proxy is using self generated certificates
|
||||
OC_INSECURE: "${INSECURE:-false}"
|
||||
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
|
||||
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
|
||||
# demo users
|
||||
IDM_CREATE_DEMO_USERS: "${DEMO_USERS:-false}"
|
||||
# admin password
|
||||
IDM_ADMIN_PASSWORD: "${INITIAL_ADMIN_PASSWORD}"
|
||||
# email server (if configured)
|
||||
NOTIFICATIONS_SMTP_HOST: "${SMTP_HOST}"
|
||||
NOTIFICATIONS_SMTP_PORT: "${SMTP_PORT}"
|
||||
NOTIFICATIONS_SMTP_SENDER: "${SMTP_SENDER:-OpenCloud Notifications <notifications@cloud.opencloud.test>}"
|
||||
NOTIFICATIONS_SMTP_USERNAME: "${SMTP_USERNAME}"
|
||||
NOTIFICATIONS_SMTP_PASSWORD: "${SMTP_PASSWORD}"
|
||||
NOTIFICATIONS_SMTP_INSECURE: "${SMTP_INSECURE:-false}"
|
||||
NOTIFICATIONS_SMTP_AUTHENTICATION: "${SMTP_AUTHENTICATION}"
|
||||
NOTIFICATIONS_SMTP_ENCRYPTION: "${SMTP_TRANSPORT_ENCRYPTION:-none}"
|
||||
FRONTEND_ARCHIVER_MAX_SIZE: "10000000000"
|
||||
FRONTEND_CHECK_FOR_UPDATES: "${CHECK_FOR_UPDATES:-true}"
|
||||
PROXY_CSP_CONFIG_FILE_LOCATION: /etc/opencloud/csp.yaml
|
||||
# enable to allow using the banned passwords list
|
||||
OC_PASSWORD_POLICY_BANNED_PASSWORDS_LIST: banned-password-list.txt
|
||||
# control the password enforcement and policy for public shares
|
||||
OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD: "${OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD:-true}"
|
||||
OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD: "${OC_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD:-false}"
|
||||
OC_PASSWORD_POLICY_DISABLED: "${OC_PASSWORD_POLICY_DISABLED:-false}"
|
||||
OC_PASSWORD_POLICY_MIN_CHARACTERS: "${OC_PASSWORD_POLICY_MIN_CHARACTERS:-8}"
|
||||
OC_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS: "${OC_PASSWORD_POLICY_MIN_LOWERCASE_CHARACTERS:-1}"
|
||||
OC_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS: "${OC_PASSWORD_POLICY_MIN_UPPERCASE_CHARACTERS:-1}"
|
||||
OC_PASSWORD_POLICY_MIN_DIGITS: "${OC_PASSWORD_POLICY_MIN_DIGITS:-1}"
|
||||
OC_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS: "${OC_PASSWORD_POLICY_MIN_SPECIAL_CHARACTERS:-1}"
|
||||
# default language for services/WebUI; defaults to English, language code (ISO 639-1, e.g. de, en, fr)
|
||||
OC_DEFAULT_LANGUAGE: ${DEFAULT_LANGUAGE}
|
||||
volumes:
|
||||
- ./config/opencloud/csp.yaml:/etc/opencloud/csp.yaml
|
||||
- ./config/opencloud/apps.yaml:/etc/opencloud/apps.yaml
|
||||
- ./config/opencloud/banned-password-list.txt:/etc/opencloud/banned-password-list.txt
|
||||
# configure the .env file to use own paths instead of docker internal volumes
|
||||
- ${OC_CONFIG_DIR:-opencloud-config}:/etc/opencloud
|
||||
- ${OC_DATA_DIR:-opencloud-data}:/var/lib/opencloud
|
||||
- ${OC_APPS_DIR:-./config/opencloud/apps}:/var/lib/opencloud/web/assets/apps
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
opencloud-config:
|
||||
opencloud-data:
|
||||
|
||||
networks:
|
||||
opencloud-net:
|
||||
8
filesync/compose/opencloud/env-aenderungen.txt
Normal file
8
filesync/compose/opencloud/env-aenderungen.txt
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# OpenCloud: .env aus opencloud-compose (.env.example, Commit c957c36 vom 2026-10-12), nur diese 5 Zeilen geändert
|
||||
# INSECURE=true -> auskommentiert
|
||||
OC_DOMAIN=cloud.example.com
|
||||
TRAEFIK_ACME_MAIL=you@your-real-domain.tld # NICHT example.com/example.org: Let's Encrypt lehnt das ab (invalidContact)
|
||||
INITIAL_ADMIN_PASSWORD=<eigenes Passwort> # Pflicht, leer = Neustart-Schleife
|
||||
COMPOSE_FILE=docker-compose.yml:traefik/opencloud.yml
|
||||
# Achtung: .env.example setzt OC_DOCKER_IMAGE=opencloudeu/opencloud-rolling (Rolling-Release, im Lab 8.1.0),
|
||||
# die Produktionslinie heißt opencloudeu/opencloud (7.2.x).
|
||||
54
filesync/compose/opencloud/traefik-opencloud.yml
Normal file
54
filesync/compose/opencloud/traefik-opencloud.yml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
services:
|
||||
opencloud:
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# define middleware here, to make sure its loaded with the first defined container (opencloud)
|
||||
# if defined in the traefik container with a disabled dashboard it won't be loaded fast enough
|
||||
- "traefik.http.middlewares.hsts-header.headers.stsSeconds=31536000"
|
||||
- "traefik.http.middlewares.hsts-header.headers.stsIncludeSubdomains=true"
|
||||
- "traefik.http.middlewares.hsts-header.headers.stsPreload=true"
|
||||
- "traefik.http.middlewares.hsts-header.headers.forceSTSHeader=true"
|
||||
- "traefik.http.routers.opencloud.entrypoints=https"
|
||||
- "traefik.http.routers.opencloud.rule=Host(`${OC_DOMAIN:-cloud.opencloud.test}`)"
|
||||
- "traefik.http.routers.opencloud.service=opencloud"
|
||||
- "traefik.http.routers.opencloud.middlewares=hsts-header"
|
||||
- "traefik.http.services.opencloud.loadbalancer.server.port=9200"
|
||||
- "traefik.http.routers.opencloud.${TRAEFIK_SERVICES_TLS_CONFIG}"
|
||||
traefik:
|
||||
image: traefik:v3.7.14
|
||||
# release notes: https://github.com/traefik/traefik/releases
|
||||
user: ${TRAEFIK_CONTAINER_UID_GID:-0:0}
|
||||
networks:
|
||||
opencloud-net:
|
||||
aliases:
|
||||
- ${OC_DOMAIN:-cloud.opencloud.test}
|
||||
entrypoint: [ "/bin/sh", "/opt/traefik/bin/docker-entrypoint-override.sh"]
|
||||
environment:
|
||||
- "TRAEFIK_SERVICES_TLS_CONFIG=${TRAEFIK_SERVICES_TLS_CONFIG:-tls.certresolver=letsencrypt}"
|
||||
- "TRAEFIK_ACME_MAIL=${TRAEFIK_ACME_MAIL:-example@example.org}"
|
||||
- "TRAEFIK_ACME_CASERVER=${TRAEFIK_ACME_CASERVER:-https://acme-v02.api.letsencrypt.org/directory}"
|
||||
- "TRAEFIK_LOG_LEVEL=${TRAEFIK_LOG_LEVEL:-ERROR}"
|
||||
- "TRAEFIK_ACCESS_LOG=${TRAEFIK_ACCESS_LOG:-false}"
|
||||
- "TRAEFIK_PORT_HTTP=${TRAEFIK_PORT_HTTP:-80}"
|
||||
- "TRAEFIK_PORT_HTTPS=${TRAEFIK_PORT_HTTPS:-443}"
|
||||
ports:
|
||||
- "${TRAEFIK_PORT_HTTP:-80}:${TRAEFIK_PORT_HTTP:-80}"
|
||||
- "${TRAEFIK_PORT_HTTPS:-443}:${TRAEFIK_PORT_HTTPS:-443}"
|
||||
volumes:
|
||||
- "${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock:ro"
|
||||
- "./config/traefik/docker-entrypoint-override.sh:/opt/traefik/bin/docker-entrypoint-override.sh"
|
||||
- "${TRAEFIK_CERTS_DIR:-./certs}:/certs"
|
||||
- "./config/traefik/dynamic:/etc/traefik/dynamic"
|
||||
labels:
|
||||
- "traefik.enable=${TRAEFIK_DASHBOARD:-false}"
|
||||
# defaults to admin:admin
|
||||
- "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_BASIC_AUTH_USERS:-admin:$$apr1$$4vqie50r$$YQAmQdtmz5n9rEALhxJ4l.}"
|
||||
- "traefik.http.routers.traefik.entrypoints=https"
|
||||
- "traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DOMAIN:-traefik.opencloud.test}`)"
|
||||
- "traefik.http.routers.traefik.middlewares=traefik-auth"
|
||||
- "traefik.http.routers.traefik.${TRAEFIK_SERVICES_TLS_CONFIG}"
|
||||
- "traefik.http.routers.traefik.service=api@internal"
|
||||
logging:
|
||||
driver: ${LOG_DRIVER:-local}
|
||||
restart: always
|
||||
26
filesync/compose/seafile/caddy.yml
Normal file
26
filesync/compose/seafile/caddy.yml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
services:
|
||||
|
||||
caddy:
|
||||
image: ${SEAFILE_CADDY_IMAGE:-lucaslorentz/caddy-docker-proxy:2.12-alpine}
|
||||
restart: unless-stopped
|
||||
container_name: seafile-caddy
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
environment:
|
||||
- CADDY_INGRESS_NETWORKS=seafile-net
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ${SEAFILE_CADDY_VOLUME:-/opt/seafile-caddy}:/data/caddy
|
||||
networks:
|
||||
- seafile-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl --fail http://localhost:2019/metrics || exit 1"]
|
||||
start_period: 20s
|
||||
interval: 20s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
networks:
|
||||
seafile-net:
|
||||
name: seafile-net
|
||||
87
filesync/compose/seafile/env.official
Normal file
87
filesync/compose/seafile/env.official
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
#################################
|
||||
# Docker compose configurations #
|
||||
#################################
|
||||
COMPOSE_FILE='seafile-server.yml,caddy.yml,seadoc.yml'
|
||||
COMPOSE_PATH_SEPARATOR=','
|
||||
|
||||
## Images
|
||||
SEAFILE_IMAGE=seafileltd/seafile-mc:13.0-latest
|
||||
SEAFILE_DB_IMAGE=mariadb:10.11
|
||||
SEAFILE_REDIS_IMAGE=redis
|
||||
SEAFILE_CADDY_IMAGE=lucaslorentz/caddy-docker-proxy:2.12-alpine
|
||||
SEADOC_IMAGE=seafileltd/sdoc-server:2.0-latest
|
||||
NOTIFICATION_SERVER_IMAGE=seafileltd/notification-server:13.0-latest
|
||||
MD_IMAGE=seafileltd/seafile-md-server:13.0-latest
|
||||
|
||||
## Persistent Storage
|
||||
BASIC_STORAGE_PATH=/opt
|
||||
SEAFILE_VOLUME=$BASIC_STORAGE_PATH/seafile-data
|
||||
SEAFILE_MYSQL_VOLUME=$BASIC_STORAGE_PATH/seafile-mysql/db
|
||||
SEAFILE_CADDY_VOLUME=$BASIC_STORAGE_PATH/seafile-caddy
|
||||
SEADOC_VOLUME=$BASIC_STORAGE_PATH/seadoc-data
|
||||
|
||||
#################################
|
||||
# Startup parameters #
|
||||
#################################
|
||||
SEAFILE_SERVER_HOSTNAME=seafile.example.com
|
||||
SEAFILE_SERVER_PROTOCOL=http
|
||||
TIME_ZONE=Etc/UTC
|
||||
JWT_PRIVATE_KEY=
|
||||
|
||||
#####################################
|
||||
# Third-party service configuration #
|
||||
#####################################
|
||||
|
||||
## Database
|
||||
SEAFILE_MYSQL_DB_HOST=db
|
||||
SEAFILE_MYSQL_DB_USER=seafile
|
||||
SEAFILE_MYSQL_DB_PASSWORD=PASSWORD
|
||||
SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet_db
|
||||
SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db
|
||||
SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db
|
||||
|
||||
## Cache
|
||||
CACHE_PROVIDER=redis # or memcached
|
||||
|
||||
### Redis
|
||||
REDIS_HOST=redis
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=
|
||||
|
||||
### Memcached
|
||||
MEMCACHED_HOST=memcached
|
||||
MEMCACHED_PORT=11211
|
||||
|
||||
######################################
|
||||
# Initial variables #
|
||||
# (Only valid in first-time startup) #
|
||||
######################################
|
||||
|
||||
## Database root password, Used to create Seafile users
|
||||
INIT_SEAFILE_MYSQL_ROOT_PASSWORD=ROOT_PASSWORD
|
||||
|
||||
## Seafile admin user
|
||||
INIT_SEAFILE_ADMIN_EMAIL=me@example.com
|
||||
INIT_SEAFILE_ADMIN_PASSWORD=asecret
|
||||
|
||||
############################################
|
||||
# Additional configurations for extensions #
|
||||
############################################
|
||||
|
||||
## SeaDoc service
|
||||
ENABLE_SEADOC=true
|
||||
|
||||
## Notification
|
||||
ENABLE_NOTIFICATION_SERVER=false
|
||||
NOTIFICATION_SERVER_URL=
|
||||
|
||||
## Seafile AI
|
||||
ENABLE_SEAFILE_AI=false
|
||||
ENABLE_FACE_RECOGNITION=false
|
||||
SEAFILE_AI_LLM_TYPE=openai
|
||||
SEAFILE_AI_LLM_URL=
|
||||
SEAFILE_AI_LLM_KEY= # your llm key
|
||||
SEAFILE_AI_LLM_MODEL=gpt-4o-mini
|
||||
|
||||
## Metadata server
|
||||
MD_FILE_COUNT_LIMIT=100000
|
||||
36
filesync/compose/seafile/notification-server.yml
Normal file
36
filesync/compose/seafile/notification-server.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
services:
|
||||
|
||||
notification-server:
|
||||
image: ${NOTIFICATION_SERVER_IMAGE:-seafileltd/notification-server:13.0-latest}
|
||||
container_name: notification-server
|
||||
restart: always
|
||||
volumes:
|
||||
- ${SEAFILE_VOLUME:-/opt/seafile-data}/seafile/logs:/shared/seafile/logs
|
||||
# ports:
|
||||
# - "8083:8083"
|
||||
environment:
|
||||
- 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}
|
||||
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
|
||||
- SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
|
||||
- NOTIFICATION_SERVER_LOG_LEVEL=${NOTIFICATION_SERVER_LOG_LEVEL:-info}
|
||||
labels:
|
||||
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
|
||||
caddy.1_handle_path: "/notification*"
|
||||
caddy.1_handle_path.0_rewrite: "* {uri}"
|
||||
caddy.1_handle_path.1_reverse_proxy: "{{upstreams 8083}}"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
seafile:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- seafile-net
|
||||
|
||||
networks:
|
||||
seafile-net:
|
||||
name: seafile-net
|
||||
37
filesync/compose/seafile/seadoc.yml
Normal file
37
filesync/compose/seafile/seadoc.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
services:
|
||||
|
||||
seadoc:
|
||||
image: ${SEADOC_IMAGE:-seafileltd/sdoc-server:2.0-latest}
|
||||
container_name: seadoc
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ${SEADOC_VOLUME:-/opt/seadoc-data/}:/shared
|
||||
# ports:
|
||||
# - "80:80"
|
||||
environment:
|
||||
- DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
|
||||
- DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
|
||||
- DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
|
||||
- DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
|
||||
- DB_NAME=${SEADOC_MYSQL_DB_NAME:-${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db}}
|
||||
- TIME_ZONE=${TIME_ZONE:-Etc/UTC}
|
||||
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
|
||||
- NON_ROOT=${NON_ROOT:-false}
|
||||
- SEAHUB_SERVICE_URL=${SEAHUB_SERVICE_URL:-http://seafile}
|
||||
labels:
|
||||
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
|
||||
caddy.1_handle_path: "/socket.io/*"
|
||||
caddy.1_handle_path.0_rewrite: "* /socket.io{uri}"
|
||||
caddy.1_handle_path.1_reverse_proxy: "{{upstreams 80}}"
|
||||
caddy.2_handle_path: "/sdoc-server/*"
|
||||
caddy.2_handle_path.0_rewrite: "* {uri}"
|
||||
caddy.2_handle_path.1_reverse_proxy: "{{upstreams 80}}"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- seafile-net
|
||||
|
||||
networks:
|
||||
seafile-net:
|
||||
name: seafile-net
|
||||
103
filesync/compose/seafile/seafile-server.yml
Normal file
103
filesync/compose/seafile/seafile-server.yml
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
services:
|
||||
db:
|
||||
image: ${SEAFILE_DB_IMAGE:-mariadb:10.11}
|
||||
container_name: seafile-mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:-}
|
||||
- MYSQL_LOG_CONSOLE=true
|
||||
- MARIADB_AUTO_UPGRADE=1
|
||||
volumes:
|
||||
- "${SEAFILE_MYSQL_VOLUME:-/opt/seafile-mysql/db}:/var/lib/mysql"
|
||||
networks:
|
||||
- seafile-net
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"/usr/local/bin/healthcheck.sh",
|
||||
"--connect",
|
||||
"--mariadbupgrade",
|
||||
"--innodb_initialized",
|
||||
]
|
||||
interval: 20s
|
||||
start_period: 30s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
redis:
|
||||
image: ${SEAFILE_REDIS_IMAGE:-redis}
|
||||
container_name: seafile-redis
|
||||
restart: unless-stopped
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- exec redis-server --requirepass "$$REDIS_PASSWORD" --save "" --appendonly no
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
networks:
|
||||
- seafile-net
|
||||
|
||||
seafile:
|
||||
image: ${SEAFILE_IMAGE:-seafileltd/seafile-mc:13.0-latest}
|
||||
container_name: seafile
|
||||
restart: unless-stopped
|
||||
# ports:
|
||||
# - "80:80"
|
||||
volumes:
|
||||
- ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
|
||||
environment:
|
||||
- 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}
|
||||
- TIME_ZONE=${TIME_ZONE:-Etc/UTC}
|
||||
- INIT_SEAFILE_ADMIN_EMAIL=${INIT_SEAFILE_ADMIN_EMAIL:-me@example.com}
|
||||
- INIT_SEAFILE_ADMIN_PASSWORD=${INIT_SEAFILE_ADMIN_PASSWORD:-asecret}
|
||||
- SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
|
||||
- SEAFILE_SERVER_PROTOCOL=${SEAFILE_SERVER_PROTOCOL:-http}
|
||||
- SITE_ROOT=${SITE_ROOT:-/}
|
||||
- NON_ROOT=${NON_ROOT:-false}
|
||||
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
|
||||
- SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
|
||||
- ENABLE_GO_FILESERVER=${ENABLE_GO_FILESERVER:-true}
|
||||
- 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_HOST=${REDIS_HOST:-redis}
|
||||
- REDIS_PORT=${REDIS_PORT:-6379}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
||||
- MEMCACHED_HOST=${MEMCACHED_HOST:-memcached}
|
||||
- MEMCACHED_PORT=${MEMCACHED_PORT:-11211}
|
||||
- ENABLE_NOTIFICATION_SERVER=${ENABLE_NOTIFICATION_SERVER:-false}
|
||||
- INNER_NOTIFICATION_SERVER_URL=${INNER_NOTIFICATION_SERVER_URL:-http://notification-server:8083}
|
||||
- NOTIFICATION_SERVER_URL=${NOTIFICATION_SERVER_URL:-${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}/notification}
|
||||
- ENABLE_SEAFILE_AI=${ENABLE_SEAFILE_AI:-false}
|
||||
- ENABLE_FACE_RECOGNITION=${ENABLE_FACE_RECOGNITION:-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}}"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:80 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_started
|
||||
networks:
|
||||
- seafile-net
|
||||
|
||||
networks:
|
||||
seafile-net:
|
||||
name: seafile-net
|
||||
Loading…
Add table
Add a link
Reference in a new issue