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

49 lines
1.7 KiB
Text
Raw Normal View History

2025-08-13 17:43:37 +02:00
services:
healthchecks:
image: healthchecks/healthchecks:${HEALTHCHECKS_VERSION}
container_name: healthchecks
restart: always
volumes:
- db:/data
networks:
traefik:
environment:
- DB=sqlite
- DB_NAME=/data/hc.sqlite
- DEBUG=False
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_USE_TLS=${EMAIL_USE_TLS}
- EMAIL_USE_VERIFICATION=${EMAIL_USE_VERIFICATION}
- SECRET_KEY=${SECRET_KEY}
- SITE_ROOT=${SITE_ROOT}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- PING_ENDPOINT=${PING_ENDPOINT}
- SITE_NAME=${SITE_NAME}
{% if container_traefik_auth == 'sso' %}
- REMOTE_USER_HEADER=HTTP_REMOTE_EMAIL
{% endif %}
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik"
- "traefik.http.routers.healthchecks.entrypoints=http"
- "traefik.http.routers.healthchecks.rule=Host(`${HEALTHCHECKS_DOMAIN}`)"
- "traefik.http.middlewares.healthchecks-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.healthchecks.middlewares=traefik-https-redirect"
- "traefik.http.routers.healthchecks-secure.entrypoints=https"
- "traefik.http.routers.healthchecks-secure.rule=Host(`${HEALTHCHECKS_DOMAIN}`)"
- "traefik.http.routers.healthchecks-secure.tls=true"
- "traefik.http.services.healthchecks.loadbalancer.server.port=8000"
{% if container_traefik_auth == 'sso' %}
- "traefik.http.routers.healthchecks-secure.middlewares=middlewares-authelia@file"
{% endif %}
networks:
traefik:
external: true
volumes:
db: