parent
db5e642f22
commit
e484b979dd
|
@ -1,4 +1,7 @@
|
||||||
export SERVICE=${REPO_NAME_KEBAB}
|
export SERVICE=${REPO_NAME_KEBAB}
|
||||||
export DOMAIN=${REPO_NAME_KEBAB}.example.com
|
|
||||||
export STACK_NAME=${REPO_NAME_SNAKE}
|
export STACK_NAME=${REPO_NAME_SNAKE}
|
||||||
|
|
||||||
|
export DOMAIN=${REPO_NAME_KEBAB}.example.com
|
||||||
|
## Domain aliases
|
||||||
|
#export EXTRA_DOMAINS=', `www.wordpress.example.com`'
|
||||||
export LETS_ENCRYPT_ENV=production
|
export LETS_ENCRYPT_ENV=production
|
||||||
|
|
10
compose.yml
10
compose.yml
|
@ -11,12 +11,14 @@ services:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=proxy"
|
|
||||||
- "traefik.http.routers.${STACK_NAME}.tls=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}`)"
|
- "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}.entrypoints=web-secure"
|
||||||
|
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
|
## 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}"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost"]
|
test: ["CMD", "curl", "-f", "http://localhost"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|
Loading…
Reference in New Issue