From 89d618582dd6be5320851f200861fdf280ea787f Mon Sep 17 00:00:00 2001 From: Mohmmed Elfateh Sabry <59346303+elfateh4@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:08:30 +0300 Subject: [PATCH] Add health checks and service dependencies for Authelia in Docker Compose --- docker-compose.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 5fc4d09..a0baee5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,6 +98,9 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data + depends_on: + authelia: + condition: service_healthy labels: - traefik.enable=true - traefik.http.routers.portainer.rule=Host(`portainer.gate.${DOMAIN}`) @@ -122,6 +125,12 @@ services: AUTHELIA_SESSION_SECRET: "${AUTHELIA_SESSION_SECRET}" AUTHELIA_STORAGE_ENCRYPTION_KEY: "${AUTHELIA_STORAGE_ENCRYPTION_KEY}" DOMAIN: "${DOMAIN}" + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9091/api/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s labels: - traefik.enable=true - traefik.http.routers.authelia.rule=Host(`auth.gate.${DOMAIN}`) @@ -144,6 +153,9 @@ services: volumes: - uptime_kuma_data:/app/data networks: [traefik_proxy] + depends_on: + authelia: + condition: service_healthy labels: - traefik.enable=true - traefik.http.routers.kuma.rule=Host(`uptime.gate.${DOMAIN}`)