introduce config.js

This commit is contained in:
Philipp Rothmann
2022-07-12 17:11:14 +02:00
parent 26ee1500d0
commit 4223ba3dc9
3 changed files with 301 additions and 5 deletions

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: promasu/cryptpad:v4.12.1-nginx
image: promasu/cryptpad:v5.0.0-nginx-alpine
networks:
- proxy
environment:
@ -11,7 +11,9 @@ services:
- "CPAD_SANDBOX_DOMAIN=sandbox.${DOMAIN}"
# Traefik can't use HTTP2 to communicate with cryptpat_websocket
# A workaroung is disabling HTTP2 in Nginx
- CPAD_HTTP2_DISABLE=true
- "CPAD_HTTP2_DISABLE=true"
- "CPAD_REALIP_RECURSIVE=on"
- "CPAD_REALIP_HEADER=X-Real-Ip"
volumes:
- cryptpad_blob:/cryptpad/blob
@ -20,6 +22,9 @@ services:
- cryptpad_data:/cryptpad/data
- cryptpad_files:/cryptpad/datastore
- cryptpad_config:/cryptpad/config/
configs:
- source: config_js
target: /cryptpad/config/config.js
deploy:
restart_policy:
@ -30,13 +35,13 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`, `sandbox.${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.tls.domains[0].main=${DOMAIN}"
- "traefik.http.routers.${STACK_NAME}.tls.domains[0].sans=sandbox.${DOMAIN}"
# - "traefik.http.routers.${STACK_NAME}.tls.domains[0].main=${DOMAIN}"
# - "traefik.http.routers.${STACK_NAME}.tls.domains[0].sans=sandbox.${DOMAIN}"
## Redirect from EXTRA_DOMAINS to DOMAIN
#- "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}"
- "coop-cloud.${STACK_NAME}.version=0.2.0+v4.12.1-nginx"
- "coop-cloud.${STACK_NAME}.version=0.3.0+v5.0.0-nginx-alpine"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
@ -55,3 +60,9 @@ volumes:
cryptpad_data:
cryptpad_files:
cryptpad_config:
configs:
config_js:
name: ${STACK_NAME}_config_${CONFIG_VERSION}
file: config.js.tmpl
template_driver: golang