Initial config

This commit is contained in:
3wc 2020-10-26 02:16:06 +02:00
parent 86356c848a
commit f2892902aa
2 changed files with 14 additions and 9 deletions

View File

@ -1,7 +1,7 @@
export SERVICE=h-5ai
export STACK_NAME=h_5ai
export SERVICE=h5ai
export STACK_NAME=h5ai
export DOMAIN=h-5ai.example.com
export DOMAIN=h5ai.example.com
## Domain aliases
#export EXTRA_DOMAINS=', `www.h-5ai.example.com`'
#export EXTRA_DOMAINS=', `www.h5ai.example.com`'
export LETS_ENCRYPT_ENV=production

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: nginx:1.19.2
image: michaeljefferys/docker-h5ai
networks:
- proxy
deploy:
@ -16,11 +16,13 @@ services:
- "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}"
- "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}"
volumes:
- "files:/var/www/"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
test: ["CMD", "wget", "-qO", "-", "http://localhost"]
interval: 30s
timeout: 10s
retries: 10
@ -29,3 +31,6 @@ services:
networks:
proxy:
external: true
volumes:
files: