This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/seafile/docker-stack.yml.j2
2023-05-02 16:24:30 +02:00

68 lines
1.7 KiB
Django/Jinja

# vi: ft=yaml
version: '3'
networks:
traefik:
external: true
seafile:
services:
db:
image: mariadb:10.5
environment:
- MYSQL_ROOT_PASSWORD={{ db_root_passwd }}
- MYSQL_LOG_CONSOLE=true
volumes:
- type: bind
source: /mnt/data/seafile/db
target: /var/lib/mysql
networks:
- seafile
deploy:
placement:
constraints:
- "node.labels.seafile == true"
memcached:
image: memcached:1.6
entrypoint: memcached -m 256
networks:
- seafile
deploy:
placement:
constraints:
- "node.labels.seafile == true"
seafile:
image: seafileltd/seafile-mc:9.0.10
volumes:
- type: bind
source: /mnt/data/seafile/data
target: /shared
environment:
- DB_HOST=db
- DB_ROOT_PASSWD={{ db_root_passwd }}
- TIME_ZONE=Europe/Amsterdam
- SEAFILE_ADMIN_EMAIL={{ seafile_admin_email }}
- SEAFILE_ADMIN_PASSWORD={{ seafile_admin_password }}
- SEAFILE_SERVER_LETSENCRYPT=false
- SEAFILE_SERVER_HOSTNAME={{ seafile_domain }}
deploy:
placement:
constraints:
- "node.labels.seafile == true"
labels:
- traefik.enable=true
- traefik.http.routers.seafile.entrypoints=websecure
- traefik.http.routers.seafile.rule=Host(`{{ seafile_domain }}`)
- traefik.http.routers.seafile.tls=true
- traefik.http.routers.seafile.tls.certresolver=letsencrypt
- traefik.http.services.seafile.loadbalancer.server.port=80
- traefik.http.routers.seafile.service=seafile
- traefik.docker.network=traefik
depends_on:
- db
- memcached
networks:
- traefik
- seafile