mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
add docker-compose swarm example
This commit is contained in:
parent
6bdd98c225
commit
3fe6ecd9d3
90
compose/docker-compose-swarm.yml
Normal file
90
compose/docker-compose-swarm.yml
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
seafile-server:
|
||||||
|
image: ggogel/seafile-server:8.0.2
|
||||||
|
volumes:
|
||||||
|
- seafile-data:/shared
|
||||||
|
environment:
|
||||||
|
- DB_HOST=db
|
||||||
|
- DB_ROOT_PASSWD=db_dev
|
||||||
|
- TIME_ZONE=Europe/Berlin
|
||||||
|
- SEAFILE_ADMIN_EMAIL=me@example.com
|
||||||
|
- SEAFILE_ADMIN_PASSWORD=asecret
|
||||||
|
- HTTPS=false # Set this to true if you plan to use a reverse proxy with HTTPS. Can be changed later in the admin settings on the web-ui.
|
||||||
|
- SEAFILE_SERVER_HOSTNAME=seafile.mydomain.com # Mandatory on first deployment!
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- memcached
|
||||||
|
networks:
|
||||||
|
- seafile-net
|
||||||
|
|
||||||
|
seahub:
|
||||||
|
image: ggogel/seahub:8.0.2
|
||||||
|
volumes:
|
||||||
|
- seafile-data:/shared
|
||||||
|
- seahub-avatars:/shared/seafile/seahub-data/avatars
|
||||||
|
- seahub-custom:/shared/seafile/seahub-data/custom
|
||||||
|
depends_on:
|
||||||
|
- seafile
|
||||||
|
networks:
|
||||||
|
- seafile-net
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
|
||||||
|
seahub-media:
|
||||||
|
image: ggogel/seahub-media
|
||||||
|
volumes:
|
||||||
|
- seahub-avatars:/usr/share/caddy/media/avatars
|
||||||
|
- seahub-custom:/usr/share/caddy/media/custom
|
||||||
|
networks:
|
||||||
|
- seafile-net
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: mariadb:latest
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=db_dev
|
||||||
|
- MYSQL_LOG_CONSOLE=true
|
||||||
|
volumes:
|
||||||
|
- seafile-mariadb:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
- seafile-net
|
||||||
|
|
||||||
|
memcached:
|
||||||
|
image: memcached:latest
|
||||||
|
entrypoint: memcached -m 1024
|
||||||
|
networks:
|
||||||
|
- seafile-net
|
||||||
|
|
||||||
|
seafile-caddy:
|
||||||
|
image: ggogel/seafile-caddy:swarm
|
||||||
|
networks:
|
||||||
|
- seafile-net
|
||||||
|
- caddy
|
||||||
|
deploy:
|
||||||
|
endpoint_mode: dnsrr # this enables caddy to see all IPs of service's replicas
|
||||||
|
labels:
|
||||||
|
caddy: http://seafile.gogel.me
|
||||||
|
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
seafile-net:
|
||||||
|
internal: true
|
||||||
|
caddy:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
seafile-data:
|
||||||
|
driver: glusterfs
|
||||||
|
name: "seafile-data"
|
||||||
|
seafile-mariadb:
|
||||||
|
driver: glusterfs
|
||||||
|
name: "seafile-mariadb"
|
||||||
|
seahub-avatars:
|
||||||
|
driver: glusterfs
|
||||||
|
name: "seafile-data/seafile/seahub-data/avatars"
|
||||||
|
seahub-custom:
|
||||||
|
driver: glusterfs
|
||||||
|
name: "seafile-data/seafile/seahub-data/custom"
|
||||||
|
|
Loading…
Reference in a new issue