From 602dc3d12dba5a9fcb31b22648d873abdac3f720 Mon Sep 17 00:00:00 2001 From: EZ-Homelab Date: Sat, 24 Jan 2026 17:26:52 -0500 Subject: [PATCH] Add comprehensive health checks for Sablier lazy loading services - Add health checks to all services using Sablier lazy loading - Utilities stack: Backrest, Duplicati, Form.io, Vaultwarden - Productivity stack: Nextcloud, WordPress, Gitea, BookStack, MediaWiki - Media Management stack: Sonarr, Radarr, Prowlarr, Jellyseerr - Infrastructure stack: Dozzle, Glances, Code Server - Dashboards stack: Homarr - Health checks use curl to service endpoints with 30s intervals - Appropriate start_period delays for service initialization - This resolves Sablier warnings about missing health checks --- .../dynamic/external-host-production.yml | 2 +- docker-compose/dashboards/docker-compose.yml | 6 ++++ .../infrastructure/docker-compose.yml | 18 +++++++++++ .../media-management/docker-compose.yml | 24 +++++++++++++++ .../productivity/docker-compose.yml | 30 +++++++++++++++++++ docker-compose/utilities/docker-compose.yml | 24 +++++++++++++++ 6 files changed, 103 insertions(+), 1 deletion(-) diff --git a/config-templates/traefik/dynamic/external-host-production.yml b/config-templates/traefik/dynamic/external-host-production.yml index c27fbdf..2ea4818 100644 --- a/config-templates/traefik/dynamic/external-host-production.yml +++ b/config-templates/traefik/dynamic/external-host-production.yml @@ -486,7 +486,7 @@ http: mediawiki-${SERVER_HOSTNAME}: loadBalancer: servers: - - url: "http://192.168.4.11:8084" + - url: "http://192.168.4.11:8086" passHostHeader: true motioneye-${SERVER_HOSTNAME}: diff --git a/docker-compose/dashboards/docker-compose.yml b/docker-compose/dashboards/docker-compose.yml index 450330e..357ea47 100644 --- a/docker-compose/dashboards/docker-compose.yml +++ b/docker-compose/dashboards/docker-compose.yml @@ -83,6 +83,12 @@ services: - /var/run/docker.sock:/var/run/docker.sock environment: - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:7575/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # Service metadata diff --git a/docker-compose/infrastructure/docker-compose.yml b/docker-compose/infrastructure/docker-compose.yml index 2c6222f..c2c38e0 100644 --- a/docker-compose/infrastructure/docker-compose.yml +++ b/docker-compose/infrastructure/docker-compose.yml @@ -148,6 +148,12 @@ services: - DOZZLE_LEVEL=info - DOZZLE_TAILSIZE=300 - DOZZLE_FILTER=status=running + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s labels: # TRAEFIK CONFIGURATION # Service metadata @@ -194,6 +200,12 @@ services: - ./glances/config:/glances/conf environment: - GLANCES_OPT=-w + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:61208/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s labels: # TRAEFIK CONFIGURATION # Service metadata @@ -244,6 +256,12 @@ services: - TZ=${TZ} - PASSWORD=${CODE_SERVER_PASSWORD} - SUDO_PASSWORD=${CODE_SERVER_SUDO_PASSWORD} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8443/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # Service metadata diff --git a/docker-compose/media-management/docker-compose.yml b/docker-compose/media-management/docker-compose.yml index 62dda42..94e30d3 100644 --- a/docker-compose/media-management/docker-compose.yml +++ b/docker-compose/media-management/docker-compose.yml @@ -39,6 +39,12 @@ services: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8989/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # ========================================== @@ -77,6 +83,12 @@ services: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:7878/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # ========================================== @@ -113,6 +125,12 @@ services: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9696/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # ========================================== @@ -301,6 +319,12 @@ services: environment: - LOG_LEVEL=info - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:5055/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # ========================================== diff --git a/docker-compose/productivity/docker-compose.yml b/docker-compose/productivity/docker-compose.yml index 1191b31..31f63be 100644 --- a/docker-compose/productivity/docker-compose.yml +++ b/docker-compose/productivity/docker-compose.yml @@ -53,6 +53,12 @@ services: - TRUSTED_PROXIES=172.18.0.0/16 - OVERWRITEPROTOCOL=https - OVERWRITEHOST=nextcloud.${DOMAIN} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/status.php"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: - nextcloud-db labels: @@ -148,6 +154,12 @@ services: - WORDPRESS_DB_USER=wordpress - WORDPRESS_DB_PASSWORD=${WORDPRESS_DB_PASSWORD} - WORDPRESS_DB_NAME=wordpress + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: - wordpress-db labels: @@ -218,6 +230,12 @@ services: - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=${GITEA_DB_PASSWORD} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: - gitea-db labels: @@ -316,6 +334,12 @@ services: - DB_USERNAME=bookstack - DB_PASSWORD=${BOOKSTACK_DB_PASSWORD} - APP_KEY=base64:NsYD8+8MAvtBhK8xw9p8pxQDy4x8aOQi/78M3CsseAw= + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: - bookstack-db labels: @@ -373,6 +397,12 @@ services: - MEDIAWIKI_DB_NAME=mediawiki - MEDIAWIKI_DB_USER=mediawiki - MEDIAWIKI_DB_PASSWORD=${MEDIAWIKI_DB_PASSWORD} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: - mediawiki-db labels: diff --git a/docker-compose/utilities/docker-compose.yml b/docker-compose/utilities/docker-compose.yml index 2d13ac6..6565c95 100644 --- a/docker-compose/utilities/docker-compose.yml +++ b/docker-compose/utilities/docker-compose.yml @@ -41,6 +41,12 @@ services: - BACKREST_DATA=/data - BACKREST_CONFIG=/config/config.json - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9898/api/v1/status"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s labels: # TRAEFIK CONFIGURATION # Service metadata @@ -79,6 +85,12 @@ services: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8200/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: # TRAEFIK CONFIGURATION # Service metadata @@ -113,6 +125,12 @@ services: - MONGO=mongodb://formio-mongo:27017/formio - JWT_SECRET=${FORMIO_JWT_SECRET} - DB_SECRET=${FORMIO_DB_SECRET} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3001/health"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: - formio-mongo labels: @@ -171,6 +189,12 @@ services: # - SMTP_SECURITY=${SMTP_SECURITY} # - SMTP_USERNAME=${SMTP_USERNAME} # - SMTP_PASSWORD=${SMTP_PASSWORD} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:80/"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s labels: # TRAEFIK CONFIGURATION # ==========================================