This repository has been archived on 2021-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
nextcloud/compose.yml

111 lines
3.3 KiB
YAML
Raw Normal View History

2020-09-08 22:52:37 +00:00
version: "3.8"
2020-06-26 23:43:19 +00:00
services:
app:
image: nextcloud:21.0.3
2020-06-26 23:43:19 +00:00
depends_on:
- db
2020-06-26 23:43:19 +00:00
secrets:
2020-06-29 14:00:04 +00:00
- db_password
2020-09-08 22:52:37 +00:00
- admin_password
2020-06-26 23:43:19 +00:00
environment:
2020-06-29 12:29:16 +00:00
- DOMAIN=${DOMAIN}
- STACK_NAME=${STACK_NAME}
- MYSQL_HOST=db
2020-09-08 23:01:15 +00:00
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD_FILE=/run/secrets/db_password
2021-02-15 00:09:04 +00:00
- NEXTCLOUD_ADMIN_USER=${ADMIN_USER}
2020-09-08 23:01:15 +00:00
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/admin_password
- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN}
- APACHE_DISABLE_REWRITE_IP=1
- TRUSTED_PROXIES=traefik
- SMTP_HOST
- MAIL_FROM_ADDRESS
- MAIL_DOMAIN
- SMTP_AUTHTYPE=PLAIN
2020-06-26 23:43:19 +00:00
volumes:
2020-09-28 20:31:41 +00:00
- nextcloud:/var/www/html/
2020-06-29 14:00:04 +00:00
- nextapps:/var/www/html/custom_apps:cached
- nextdata:/var/www/html/data:cached
- nextconfig:/var/www/html/config:cached
2020-12-09 20:51:04 +00:00
- ${EXTRA_VOLUME}
2020-06-26 23:43:19 +00:00
networks:
- proxy
- internal
2020-09-08 22:52:37 +00:00
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
2020-06-26 23:43:19 +00:00
deploy:
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.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
2021-07-05 07:02:53 +00:00
- coop-cloud.${STACK_NAME}.app.version=21.0.3-87bd33d3
db:
image: "mariadb:10.5"
2020-06-29 14:00:04 +00:00
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-09-28 20:32:06 +00:00
healthcheck:
test: 'mysql -p"$$(tr -d "\n" < /run/secrets/db_root_password)"'
interval: 20s
timeout: 2s
retries: 3
start_period: 30s
2021-04-05 00:05:08 +00:00
deploy:
labels: ["coop-cloud.${STACK_NAME}.db.version=10.5-9c681cef"]
2021-06-16 11:35:01 +00:00
cron:
image: nextcloud:21.0.3
2021-06-16 11:35:01 +00:00
volumes:
2021-06-16 11:59:18 +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
- ${EXTRA_VOLUME}
2021-06-16 11:35:01 +00:00
networks:
- internal
entrypoint: /cron.sh
2021-06-21 10:32:01 +00:00
deploy:
labels: ["coop-cloud.${STACK_NAME}.cron.version=21.0.3-87bd33d3"]
2020-06-26 23:43:19 +00:00
secrets:
2021-02-14 22:36:13 +00:00
db_root_password:
external: true
2021-02-15 00:00:23 +00:00
name: ${STACK_NAME}_db_root_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
2021-02-14 22:36:13 +00:00
db_password:
external: true
2021-02-15 00:00:23 +00:00
name: ${STACK_NAME}_db_password_${SECRET_DB_ROOT_PASSWORD_VERSION}
2021-02-14 22:36:13 +00:00
admin_password:
external: true
2021-02-15 00:00:23 +00:00
name: ${STACK_NAME}_admin_password_${SECRET_ADMIN_PASSWORD_VERSION}
2020-06-26 23:43:19 +00:00
volumes:
2020-09-28 20:31:41 +00:00
nextcloud:
2020-06-26 23:43:19 +00:00
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: