iac_stack/ansible/roles/deploy_container_ittools/templates/docker-compose.yml.j2

29 lines
1 KiB
Text
Raw Permalink Normal View History

2025-08-13 17:43:37 +02:00
---
services:
it-tools:
image: corentinth/it-tools:${ITTOOLS_VERSION}
container_name: ittools
restart: unless-stopped
networks:
traefik:
labels:
- "traefik.enable=true"
- "traefik.http.routers.ittools.entrypoints=http"
- "traefik.http.routers.ittools.rule=Host(`${ITTOOLS_DOMAIN:?error}`)"
- "traefik.http.middlewares.ittools-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.ittools.middlewares=traefik-https-redirect"
- "traefik.http.routers.ittools-secure.entrypoints=https"
- "traefik.http.routers.ittools-secure.rule=Host(`${ITTOOLS_DOMAIN:?error}`)"
- "traefik.http.routers.ittools-secure.tls=true"
- "traefik.http.services.ittools.loadbalancer.server.port=80"
- "traefik.docker.network=traefik"
healthcheck:
test: ["CMD-SHELL", "curl -fsS -m 5 http://127.0.0.1/ >/dev/null || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
networks:
traefik:
external: true