seafile/compose.yml

80 lines
2.0 KiB
YAML

---
version: "3.8"
services:
app:
image: seafileltd/seafile-mc:9.0.5
networks:
- default
- proxy
volumes:
- data:/shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD_FILE=/run/secrets/db_root_password
- TIME_ZONE
- SEAFILE_ADMIN_EMAIL
- SEAFILE_ADMIN_PASSWORD_FILE=/run/secrets/seafile_admin_password
- SEAFILE_SERVER_LETSENCRYPT=false
# - SEAFILE_SERVER_HOSTNAME=docs.seafile.com # Specifies your host name if https is enabled.
configs:
- source: entrypoint
target: /scripts/custom-entrypoint.sh
mode: 0555
secrets:
- db_root_password
- seafile_admin_password
entrypoint: /scripts/custom-entrypoint.sh
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version="
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: mariadb:10.5
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
- MYSQL_LOG_CONSOLE=true
volumes:
- db:/var/lib/mysql
secrets:
- db_root_password
memcached:
image: memcached:1.6
entrypoint: memcached -m 256
volumes:
data:
db:
networks:
default:
proxy:
external: true
configs:
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh
secrets:
db_root_password:
external: true
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
seafile_admin_password:
external: true
name: ${STACK_NAME}_seafile_admin_password_${SECRET_SEAFILE_ADMIN_PASSWORD_VERSION}