Example docker-compose file:
services:
db:
image: mariadb:10.11
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=${SEAFILE_ROOT_PASSWORD}
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- ./seafile-db:/var/lib/mysql
networks:
- seafile_dev
memcached:
image: memcached:1.6.18
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile_dev
seafile:
image: seafileltd/seafile-mc:11.0-latest
container_name: seafile
restart: unless-stopped
volumes:
- ./seafile-data:/shared # Required, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=${SEAFILE_ROOT_PASSWORD}
- TIME_ZONE=Etc/UTC
- SEAFILE_ADMIN_EMAIL=${SEAFILE_ADMIN_EMAIL}
- SEAFILE_ADMIN_PASSWORD=${SEAFILE_ADMIN_PASSWORD}
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=${SEAFILE_URL}
labels:
- "traefik.enable=true"
- "traefik.http.routers.seafile.rule=Host(`${SEAFILE_URL}`)"
- "traefik.http.routers.seafile.entrypoints=websecure"
- "traefik.http.routers.seafile.tls=true"
- "traefik.http.services.seafile.loadbalancer.server.port=80"
- "traefik.docker.network=traefik_local"
depends_on:
- db
- memcached
networks:
- seafile_dev
- seafile_internal
- traefik_local
networks:
seafile_dev:
seafile_internal:
external: true
traefik_local:
external: true