You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

77 lines
1.9 KiB

version: "3.8"
services:
nextcloud:
image: nextcloud:latest
depends_on:
- mariadb
secrets:
- db_root_password
- db_password
environment:
- MYSQL_HOST=mariadb
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_password
- DOMAIN=nextcloud.swarm.autonomic.zone
volumes:
- nextcloud:/var/www/html
- nextapps:/var/www/html/custom_apps:cached
- nextdata:/var/www/html/data:cached
- nextconfig:/var/www/html/config:cached
networks:
- proxy
- internal
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.swarm.autonomic.zone`)"
- "traefik.http.routers.nextcloud.tls.certresolver=production"
- "traefik.http.routers.nextcloud.entrypoints=web-secure"
mariadb:
image: "mariadb:10.5"
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
secrets:
- db_root_password
- db_password
volumes:
- "mariadb:/var/lib/mysql"
networks:
- internal
secrets:
db_root_password:
external: true
name: nextcloud_db_root_passwd_v1
db_password:
external: true
name: nextcloud_db_passwd_v1
volumes:
nextcloud:
nextapps:
nextdata:
nextconfig:
mariadb:
networks:
proxy:
external: true
internal: