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:
|
2023-11-06 13:44:44 +00:00
|
|
|
image: nginx:1.25.3
|
2023-11-28 10:29:55 +00:00
|
|
|
depends_on:
|
|
|
|
- app
|
2021-08-26 09:22:45 +00:00
|
|
|
configs:
|
|
|
|
- source: nginx_conf
|
|
|
|
target: /etc/nginx/nginx.conf
|
|
|
|
environment:
|
2022-09-02 14:32:04 +00:00
|
|
|
- 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="
|
2023-01-12 21:16:31 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", 'curl -s -N curl -Ns localhost/status.php | grep "installed\":true"']
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 10
|
2023-01-20 14:03:11 +00:00
|
|
|
start_period: 5m
|
2021-08-26 10:11:29 +00:00
|
|
|
|
2020-09-27 23:16:36 +00:00
|
|
|
app:
|
2024-01-21 00:51:02 +00:00
|
|
|
image: nextcloud:28.0.1-fpm
|
2020-06-26 23:43:19 +00:00
|
|
|
depends_on:
|
2020-09-27 23:16:36 +00:00
|
|
|
- db
|
2021-08-26 10:41:59 +00:00
|
|
|
configs:
|
|
|
|
- source: fpm_tune
|
2023-06-13 11:20:26 +00:00
|
|
|
target: /usr/local/etc/php-fpm.d/zzz-fpm-tune.conf
|
2022-09-02 14:32:04 +00:00
|
|
|
- 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:
|
2022-11-08 11:31:24 +00:00
|
|
|
- APPS
|
2023-01-10 17:09:11 +00:00
|
|
|
- OCC_CMDS
|
2022-09-02 14:32:04 +00:00
|
|
|
- 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
|
2021-08-26 09:05:01 +00:00
|
|
|
- OVERWRITEPROTOCOL=https
|
2023-06-09 13:38:52 +00:00
|
|
|
- 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}
|
2022-12-14 11:12:41 +00:00
|
|
|
- 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:
|
2020-09-27 23:16:36 +00:00
|
|
|
update_config:
|
|
|
|
failure_action: rollback
|
|
|
|
order: start-first
|
2021-08-26 10:14:52 +00:00
|
|
|
labels:
|
2024-01-21 00:51:02 +00:00
|
|
|
- "coop-cloud.${STACK_NAME}.version=6.0.0+28.0.1-fpm"
|
2023-04-13 17:50:40 +00:00
|
|
|
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
|
2022-05-18 08:36:26 +00:00
|
|
|
- "backupbot.backup=true"
|
|
|
|
- "backupbot.backup.path=/var/www/html/config/,/var/www/html/data/,/var/www/html/custom_apps/"
|
2023-01-12 21:16:31 +00:00
|
|
|
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
|
2023-11-28 13:39:50 +00:00
|
|
|
start_period: 15m
|
2021-08-26 10:11:29 +00:00
|
|
|
|
2021-08-26 10:12:02 +00:00
|
|
|
cron:
|
2024-01-21 00:51:02 +00:00
|
|
|
image: nextcloud:28.0.1-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:
|
2024-01-21 00:51:02 +00:00
|
|
|
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"
|
2023-01-12 21:16:31 +00:00
|
|
|
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
|
|
|
|
2022-09-02 14:32:04 +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
|
2021-08-26 10:41:59 +00:00
|
|
|
fpm_tune:
|
|
|
|
name: ${STACK_NAME}_fpm_tune_${FPM_TUNE_VERSION}
|
|
|
|
file: fpm-tune.ini
|
2022-12-13 14:20:57 +00:00
|
|
|
template_driver: golang
|
2022-09-02 14:32:04 +00:00
|
|
|
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:
|