nextcloud/compose.yml

163 lines
4.6 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:
2021-08-26 09:22:45 +00:00
web:
image: nginx:1.25.3
depends_on:
- app
2021-08-26 09:22:45 +00:00
configs:
- source: nginx_conf
target: /etc/nginx/nginx.conf
environment:
- X_FRAME_OPTIONS_ALLOW_FROM
- X_FRAME_OPTIONS_ENABLED
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}"
2023-08-22 17:08:56 +00:00
- "caddy=${DOMAIN}"
- "caddy.reverse_proxy={{upstreams 80}}"
- "caddy.tls.on_demand="
healthcheck:
test: ["CMD-SHELL", 'curl -s -N curl -Ns localhost/status.php | grep "installed\":true"']
interval: 30s
timeout: 10s
retries: 10
start_period: 5m
2021-08-26 10:11:29 +00:00
app:
image: nextcloud:28.0.2-fpm
2020-06-26 23:43:19 +00:00
depends_on:
- db
configs:
- source: fpm_tune
target: /usr/local/etc/php-fpm.d/zzz-fpm-tune.conf
- source: entrypoint
target: /custom-entrypoint.sh
mode: 555
entrypoint: /custom-entrypoint.sh
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:
- APPS
- OCC_CMDS
- X_FRAME_OPTIONS_ALLOW_FROM
- X_FRAME_OPTIONS_ENABLED
2021-08-26 10:02:21 +00:00
- DOMAIN
- STACK_NAME
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}
2023-05-08 09:43:24 +00:00
- TRUSTED_PROXIES=10.0.0.0/8
2021-08-26 08:54:30 +00:00
- REDIS_HOST=cache
- OVERWRITEPROTOCOL=https
- PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-1G}
- FPM_MAX_CHILDREN=${FPM_MAX_CHILDREN:-131}
- FPM_START_SERVERS=${FPM_START_SERVERS:-32}
- FPM_MIN_SPARE_SERVERS=${FPM_MIN_SPARE_SERVERS:-32}
- FPM_MAX_SPARE_SERVERS=${FPM_MAX_SPARE_SERVERS:-98}
- DEFAULT_QUOTA
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:
update_config:
failure_action: rollback
order: start-first
2021-08-26 10:14:52 +00:00
labels:
- "coop-cloud.${STACK_NAME}.version=6.0.1+28.0.2-fpm"
2023-04-13 17:50:40 +00:00
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
- "backupbot.backup=true"
- "backupbot.backup.path=/var/www/html/config/,/var/www/html/data/,/var/www/html/custom_apps/"
healthcheck:
test: ["CMD-SHELL", 'SCRIPT_NAME=status SCRIPT_FILENAME=/var/www/html/status.php REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000 | grep "installed\":true"']
interval: 30s
timeout: 10s
retries: 10
start_period: 15m
2021-08-26 10:11:29 +00:00
2021-08-26 10:12:02 +00:00
cron:
image: nextcloud:28.0.2-fpm
2021-08-26 10:12:02 +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:
- internal
entrypoint: /cron.sh
2021-08-26 10:11:29 +00:00
2021-08-26 10:07:37 +00:00
cache:
image: redis:7.2.4-alpine
2021-08-26 10:07:37 +00:00
networks:
- internal
2021-09-15 08:25:49 +00:00
volumes:
- "redis:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 5s
retries: 20
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_password:
external: true
2022-11-22 05:37:36 +00:00
name: ${STACK_NAME}_db_password_${SECRET_DB_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:
2021-09-15 08:25:49 +00:00
redis:
2021-08-26 09:22:45 +00:00
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
fpm_tune:
name: ${STACK_NAME}_fpm_tune_${FPM_TUNE_VERSION}
file: fpm-tune.ini
template_driver: golang
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
2021-08-26 09:22:45 +00:00
2020-06-26 23:43:19 +00:00
networks:
proxy:
external: true
2020-06-29 12:29:16 +00:00
internal: