docker compose file created with traefik labels added

This commit is contained in:
Christian Galo 2021-09-18 21:55:22 -04:00
parent cecd8ad517
commit d8a7655274
2 changed files with 31 additions and 1 deletions

View File

@ -1,4 +1,5 @@
FROM nginx:1.21-alpine
COPY public /usr/share/nginx/html
EXPOSE 80
EXPOSE 8500

29
docker-compose.yml Normal file
View File

@ -0,0 +1,29 @@
version: "3.9"
services:
app:
image: europe-west6-docker.pkg.dev/wiki-cafe-0001/docker/apex
networks:
- proxy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8500"]
interval: 10s
timeout: 10s
retries: 10
start_period: 15s
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`wiki.cafe`, `www.wiki.cafe`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "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}"
networks:
proxy:
external: true