Switch the sandbox domain to an explicit choice on the users part
This allows subdomains or separate domains - a convenience for setups that have a wildcard pointing at the CC server.
This commit is contained in:
@ -1,7 +1,11 @@
|
|||||||
TYPE=cryptpad
|
TYPE=cryptpad
|
||||||
|
|
||||||
|
|
||||||
DOMAIN=cryptpad.example.com
|
DOMAIN=cryptpad.example.com
|
||||||
|
|
||||||
|
# This is a separate domain for the secure side of Cryptpad. It can be any other domain (subdomain or separate domain)
|
||||||
|
SANDBOX_DOMAIN=sandbox.cryptpad.example.com
|
||||||
|
|
||||||
## Domain aliases
|
## Domain aliases
|
||||||
#EXTRA_DOMAINS=', `www.cryptpad.example.com`'
|
#EXTRA_DOMAINS=', `www.cryptpad.example.com`'
|
||||||
LETS_ENCRYPT_ENV=production
|
LETS_ENCRYPT_ENV=production
|
||||||
|
|||||||
@ -8,7 +8,7 @@ services:
|
|||||||
- proxy
|
- proxy
|
||||||
environment:
|
environment:
|
||||||
- "CPAD_MAIN_DOMAIN=${DOMAIN}"
|
- "CPAD_MAIN_DOMAIN=${DOMAIN}"
|
||||||
- "CPAD_SANDBOX_DOMAIN=sandbox.${DOMAIN}"
|
- "CPAD_SANDBOX_DOMAIN=${SANDBOX_DOMAIN}"
|
||||||
# Traefik can't use HTTP2 to communicate with cryptpat_websocket
|
# Traefik can't use HTTP2 to communicate with cryptpat_websocket
|
||||||
# A workaroung is disabling HTTP2 in Nginx
|
# A workaroung is disabling HTTP2 in Nginx
|
||||||
- "CPAD_HTTP2_DISABLE=true"
|
- "CPAD_HTTP2_DISABLE=true"
|
||||||
@ -32,11 +32,11 @@ services:
|
|||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
|
||||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`, `sandbox.${DOMAIN}`${EXTRA_DOMAINS})"
|
- "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}.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "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].main=${DOMAIN}"
|
||||||
# - "traefik.http.routers.${STACK_NAME}.tls.domains[0].sans=sandbox.${DOMAIN}"
|
- "traefik.http.routers.${STACK_NAME}.tls.domains[0].sans=${SANDBOX_DOMAIN}"
|
||||||
## Redirect from EXTRA_DOMAINS to DOMAIN
|
## Redirect from EXTRA_DOMAINS to DOMAIN
|
||||||
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
#- "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.SSLForceHost=true"
|
||||||
|
|||||||
Reference in New Issue
Block a user