Next cloud project
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.
 

56 lines
1.4 KiB

version: "3.7"
services:
nextcloud:
image: nextcloud:latest
depends_on:
- maindb
secrets:
- mysql_root_password
environment:
- MYSQL_HOST=maindb:3306
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=root
- MYSQL_ROOT_PASSWORD_FILE=/home/user/mysql_root_password
volumes:
- /mnt/nextcloud:/var/www/html:cached
- /mnt/nextapps:/var/www/html/custom_apps:cached
- /mnt/nextdata:/var/www/html/data:cached
- /mnt/nextconfig:/var/www/html/config:cached
networks:
- proxy
- private
deploy:
placement:
constraints: [node.role == worker]
replicas: 1
update_config:
parallelism: 2
delay: 10s
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.cloudlab.gr`)"
- "traefik.http.routers.nextcloud.tls=true"
- "traefik.http.routers.nextcloud.tls.certresolver=default"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
secrets:
mysql_root_password:
external: true
volumes:
nextcloud:
driver: "local"
nextapps:
driver: "local"
nextdata:
driver: "local"
nextconfig:
driver: "local"
networks:
proxy:
external: true
private:
external: true