2020-06-30 10:39:24 +00:00
|
|
|
version: "3.8"
|
|
|
|
|
2020-06-26 23:43:19 +00:00
|
|
|
services:
|
|
|
|
nextcloud:
|
2020-06-30 10:41:53 +00:00
|
|
|
image: nextcloud:stable-apache
|
2020-06-26 23:43:19 +00:00
|
|
|
depends_on:
|
2020-06-29 14:00:04 +00:00
|
|
|
- mariadb
|
2020-06-26 23:43:19 +00:00
|
|
|
secrets:
|
2020-06-29 12:29:16 +00:00
|
|
|
- db_root_password
|
2020-06-29 14:00:04 +00:00
|
|
|
- db_password
|
2020-06-26 23:43:19 +00:00
|
|
|
environment:
|
2020-06-29 14:00:04 +00:00
|
|
|
- MYSQL_HOST=mariadb
|
2020-06-26 23:43:19 +00:00
|
|
|
- MYSQL_DATABASE=nextcloud
|
2020-06-29 14:00:04 +00:00
|
|
|
- MYSQL_USER=nextcloud
|
|
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_password
|
2020-06-30 10:39:32 +00:00
|
|
|
- DOMAIN=nextcloud.swarm.autonomic.zone
|
2020-06-26 23:43:19 +00:00
|
|
|
volumes:
|
2020-06-29 14:00:04 +00:00
|
|
|
- nextcloud:/var/www/html
|
|
|
|
- nextapps:/var/www/html/custom_apps:cached
|
|
|
|
- nextdata:/var/www/html/data:cached
|
|
|
|
- nextconfig:/var/www/html/config:cached
|
2020-06-26 23:43:19 +00:00
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- internal
|
2020-06-30 10:42:01 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:80"]
|
|
|
|
interval: 15s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 10
|
|
|
|
start_period: 30s
|
2020-06-26 23:43:19 +00:00
|
|
|
deploy:
|
2020-06-30 10:42:08 +00:00
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
2020-06-26 23:43:19 +00:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
|
|
|
- "traefik.docker.network=proxy"
|
|
|
|
- "traefik.http.routers.nextcloud.tls=true"
|
|
|
|
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
|
2020-06-30 10:39:32 +00:00
|
|
|
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.swarm.autonomic.zone`)"
|
|
|
|
- "traefik.http.routers.nextcloud.tls.certresolver=production"
|
2020-06-29 14:00:04 +00:00
|
|
|
- "traefik.http.routers.nextcloud.entrypoints=web-secure"
|
|
|
|
|
|
|
|
mariadb:
|
|
|
|
image: "mariadb:10.5"
|
|
|
|
environment:
|
|
|
|
- MYSQL_DATABASE=nextcloud
|
|
|
|
- MYSQL_USER=nextcloud
|
2020-06-29 19:58:45 +00:00
|
|
|
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
|
2020-06-29 14:00:04 +00:00
|
|
|
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
|
|
|
|
secrets:
|
|
|
|
- db_root_password
|
|
|
|
- db_password
|
|
|
|
volumes:
|
2020-06-29 19:58:45 +00:00
|
|
|
- "mariadb:/var/lib/mysql"
|
2020-06-29 14:00:04 +00:00
|
|
|
networks:
|
|
|
|
- internal
|
2020-06-26 23:43:19 +00:00
|
|
|
|
|
|
|
secrets:
|
2020-06-30 10:39:32 +00:00
|
|
|
db_root_password:
|
|
|
|
external: true
|
|
|
|
name: nextcloud_db_root_passwd_v1
|
|
|
|
db_password:
|
|
|
|
external: true
|
|
|
|
name: nextcloud_db_passwd_v1
|
2020-06-26 23:43:19 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
nextcloud:
|
|
|
|
nextapps:
|
|
|
|
nextdata:
|
|
|
|
nextconfig:
|
2020-06-29 14:00:04 +00:00
|
|
|
mariadb:
|
2020-06-26 23:43:19 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|
2020-06-29 12:29:16 +00:00
|
|
|
internal:
|