2020-09-08 22:52:37 +00:00
|
|
|
version: "3.8"
|
2021-08-26 10:11:29 +00:00
|
|
|
|
2020-06-26 23:43:19 +00:00
|
|
|
services:
|
2021-08-26 09:22:45 +00:00
|
|
|
web:
|
2021-08-26 10:02:21 +00:00
|
|
|
image: nginx:1.20.0
|
2021-08-26 09:22:45 +00:00
|
|
|
configs:
|
|
|
|
- source: nginx_conf
|
|
|
|
target: /etc/nginx/nginx.conf
|
|
|
|
environment:
|
2021-08-26 10:02:21 +00:00
|
|
|
- DOMAIN
|
|
|
|
- STACK_NAME
|
2021-08-26 09:22:45 +00:00
|
|
|
volumes:
|
|
|
|
- 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}
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- internal
|
|
|
|
deploy:
|
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
|
|
|
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-08-26 10:11:29 +00:00
|
|
|
|
2020-09-27 23:16:36 +00:00
|
|
|
app:
|
2021-08-26 09:22:45 +00:00
|
|
|
image: nextcloud:22.1.0-fpm
|
2020-06-26 23:43:19 +00:00
|
|
|
depends_on:
|
2020-09-27 23:16:36 +00:00
|
|
|
- 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:
|
2021-08-26 10:02:21 +00:00
|
|
|
- DOMAIN
|
|
|
|
- STACK_NAME
|
2020-09-27 23:16:36 +00:00
|
|
|
- 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}
|
2020-09-08 23:17:35 +00:00
|
|
|
- TRUSTED_PROXIES=traefik
|
2021-08-26 08:54:30 +00:00
|
|
|
- REDIS_HOST=cache
|
2020-10-29 17:43:39 +00:00
|
|
|
- SMTP_HOST
|
|
|
|
- MAIL_FROM_ADDRESS
|
|
|
|
- MAIL_DOMAIN
|
|
|
|
- SMTP_AUTHTYPE=PLAIN
|
2021-08-26 09:05:01 +00:00
|
|
|
- OVERWRITEPROTOCOL=https
|
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:
|
|
|
|
- internal
|
|
|
|
deploy:
|
2020-09-27 23:16:36 +00:00
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
2021-08-26 10:11:29 +00:00
|
|
|
|
2020-09-27 23:16:36 +00:00
|
|
|
db:
|
2021-07-12 09:26:01 +00:00
|
|
|
image: "mariadb:10.5"
|
2021-08-26 09:30:22 +00:00
|
|
|
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
|
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
|
2021-04-05 00:05:08 +00:00
|
|
|
deploy:
|
2021-07-12 09:26:01 +00:00
|
|
|
labels: ["coop-cloud.${STACK_NAME}.db.version=10.5-9c681cef"]
|
2021-08-26 10:11:29 +00:00
|
|
|
|
2021-08-26 10:02:21 +00:00
|
|
|
# cron:
|
|
|
|
# image: nextcloud:22.1.0
|
|
|
|
# volumes:
|
|
|
|
# - 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}
|
|
|
|
# networks:
|
|
|
|
# - internal
|
|
|
|
# entrypoint: /cron.sh
|
|
|
|
# deploy:
|
|
|
|
# labels: ['coop-cloud.${STACK_NAME}.cron.version=22.1.0-89d9ab98']
|
2021-08-26 10:11:29 +00:00
|
|
|
|
2021-08-26 10:07:37 +00:00
|
|
|
cache:
|
|
|
|
image: redis:6.2.5-alpine
|
|
|
|
networks:
|
|
|
|
- internal
|
|
|
|
deploy:
|
|
|
|
labels:
|
|
|
|
- coop-cloud.${STACK_NAME}.cache.version=6.2.5-alpine-b658aeb0
|
2021-08-26 09:22:45 +00:00
|
|
|
|
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}
|
2021-08-26 09:22:45 +00:00
|
|
|
|
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:
|
2021-08-26 09:22:45 +00:00
|
|
|
|
|
|
|
configs:
|
|
|
|
nginx_conf:
|
|
|
|
name: ${STACK_NAME}_nginx_${NGINX_CONF_VERSION}
|
|
|
|
file: nginx.conf.tmpl
|
|
|
|
template_driver: golang
|
|
|
|
|
2020-06-26 23:43:19 +00:00
|
|
|
networks:
|
|
|
|
proxy:
|
|
|
|
external: true
|
2020-06-29 12:29:16 +00:00
|
|
|
internal:
|