From 00b88ca2ba84d4739512403d12cd23c5dd8eff6b Mon Sep 17 00:00:00 2001 From: Light1YT Date: Fri, 29 May 2026 15:09:49 +0500 Subject: [PATCH] =?UTF-8?q?fix(glitchtip):=20healthcheck=20via=20python3?= =?UTF-8?q?=20/=5Fhealth/=20=E2=80=94=20image=20has=20no=20wget=20(#644)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit glitchtip/glitchtip:6.1.6 ships neither wget nor curl (only python3), so the existing `wget --spider http://localhost:8080/api/0/` healthcheck failed on a missing binary → container reported unhealthy forever. (wget --spider also HEADs /api/0/, which GlitchTip 405s — "Method Not Allowed" in logs.) Replace with the canonical /_health/ endpoint (GET → 200) probed via the built-in python3. Verified live: the exact CMD exits 0 in the running container. Nothing depends_on glitchtip-web's health, so this only fixes the false-unhealthy status (no startup gating change). --- docker-compose.prod.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 5a6b1568..7753f281 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -160,10 +160,13 @@ services: ENABLE_ORGANIZATION_CREATION: "false" restart: always mem_limit: 512m + # Образ glitchtip:6.1.6 НЕ содержит wget/curl (только python3) → старый + # wget-healthcheck падал на missing-binary → контейнер вечно unhealthy (#644). + # Пробуем канонический /_health/ (GET → 200) через встроенный python3. healthcheck: - test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/api/0/"] + test: ["CMD", "python3", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8080/_health/', timeout=8).status == 200 else 1)"] interval: 30s - timeout: 5s + timeout: 10s retries: 5 start_period: 60s networks: [default]