From db792ebc5ec23d7de27231d6584eeb01a89a5f78 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Thu, 11 Jun 2026 00:33:49 -0700 Subject: [PATCH] chore: healthchecks on everything MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #19 probe commands verified by exec'ing them in the running containers: forgejo + evil-forgejo (/api/healthz), jellyfin (/health), copyparty, qbittorrent, jackett (/health), sonarr + radarr (/ping), syncthing (/rest/noauth/health), docker-in-docker (docker version over tcp). fixes caddy's healthcheck: 'caddy healthcheck' is not a real subcommand, so caddy reported unhealthy for 2 weeks — now probes the admin endpoint. skipped: navidrome (scratch image, no shell), pgadmin (/misc/ping 401s in this config), anubis + forward-auth (distroless), and the broken dawarich / technitium / openspeedtest (see follow-up). also tags knot, spindle, xmpp with net.paperclover.list.web=false so the app list page skips them. --- compose.yaml | 71 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/compose.yaml b/compose.yaml index f7e5e8758fbfbc9f0e11890d8b498d0dbc1e008f..c45bc074e77b6581e7277dab4da3bc6fe4b6e1a8 100755 --- a/compose.yaml +++ b/compose.yaml @@ -18,11 +18,11 @@ services: - path: ./config/Caddyfile action: restart healthcheck: - test: ["CMD", "caddy", "healthcheck", "--address", ":2019"] - interval: 10s - timeout: 5s + test: ["CMD-SHELL", "wget -qO /dev/null http://127.0.0.1:2019/config/"] + interval: 30s + timeout: 10s retries: 3 - start_period: 5s + start_period: 10s # SSO keycloak: # port 80, 443 container_name: keycloak @@ -111,6 +111,12 @@ services: - "${STORE_ROOT}:/w" - "${APP_ROOT}/copyparty:/cfg" - ./config/copyparty.conf:/cfg/copyparty.conf:ro + healthcheck: + test: ["CMD-SHELL", "wget -qO /dev/null http://127.0.0.1:80/?h"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s restart: unless-stopped labels: net.paperclover.list.name: Copyparty File Storage @@ -175,6 +181,12 @@ services: - "/etc/localtime:/etc/localtime:ro" - ./config/forgejo/public:/custom/public:ro - ./config/forgejo/init:/custom/init:ro + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:3000/api/healthz >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: net.paperclover.list.name: Clover Git Forge net.paperclover.list.domain: git @@ -247,6 +259,7 @@ services: net.paperclover.list.name: Tangled Knot net.paperclover.list.domain: knot net.paperclover.list.priority: 106 + net.paperclover.list.web: "false" knot-init: container_name: knot-init image: alpine:3.22 @@ -285,10 +298,17 @@ services: net.paperclover.list.name: Tangled Spindle net.paperclover.list.domain: spindle net.paperclover.list.priority: 107 + net.paperclover.list.web: "false" docker-in-docker: container_name: docker-in-docker image: docker:dind privileged: "true" + healthcheck: + test: ["CMD-SHELL", "docker -H tcp://localhost:2375 version >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s command: - dockerd - -H @@ -311,6 +331,12 @@ services: - "${APP_ROOT}/jellyfin/cache:/cache:rw" - "./config/jellyfin:/config/custom:ro" - "./config/jellyfin/branding.xml:/config/config/branding.xml:ro" + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:8096/health >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: net.paperclover.list.name: Cloverfin net.paperclover.list.domain: jelly @@ -378,6 +404,12 @@ services: - "${APP_ROOT}/qbittorrent:/config" - "./config/openvpn:/config/openvpn:ro" - "/etc/localtime:/etc/localtime:ro" + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:23938 >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 180s labels: net.paperclover.list.name: qBittorrent net.paperclover.list.domain: qbt @@ -393,6 +425,12 @@ services: restart: unless-stopped volumes: - "${APP_ROOT}/jackett:/config/Jackett" + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:9117/health >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s labels: net.paperclover.list.name: Jackett API Adapter net.paperclover.list.domain: jkt @@ -412,6 +450,12 @@ services: - "PGID=$GROUP_ID" - "TZ=America/Los_Angelas" image: lscr.io/linuxserver/sonarr:latest + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:8989/ping >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s volumes: - "${APP_ROOT}/sonarr:/config" - "${TORRENT_TEMP:-${APP_ROOT}/qbittorrent/tmp}:/data/tmp" @@ -429,6 +473,12 @@ services: - "PGID=$GROUP_ID" - "TZ=America/Los_Angelas" image: lscr.io/linuxserver/radarr:latest + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:7878/ping >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s volumes: - "${APP_ROOT}/radarr:/config" - "${TORRENT_TEMP:-${APP_ROOT}/qbittorrent/tmp}:/data/tmp" @@ -660,6 +710,12 @@ services: - 22000:22000/tcp - 22000:22000/udp - 21027:21027/udp + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:8384/rest/noauth/health >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s restart: unless-stopped labels: net.paperclover.list.name: Syncthing @@ -703,6 +759,7 @@ services: net.paperclover.list.name: Paper Clover XMPP net.paperclover.list.domain: xmpp net.paperclover.list.priority: 108 + net.paperclover.list.web: "false" depends_on: caddy: condition: service_started @@ -792,6 +849,12 @@ services: - "/etc/localtime:/etc/localtime:ro" - ./config/evil-infra/forgejo/public:/custom/public:ro - ./config/evil-infra/forgejo/init:/custom/init:ro + healthcheck: + test: ["CMD-SHELL", "curl -fsS http://localhost:3000/api/healthz >/dev/null"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s depends_on: postgres: condition: service_healthy -- 2.54.0