From 17e00b788ee1d965f35cd1232d015c106575eb59 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Mon, 22 Jun 2026 15:17:52 +0200 Subject: [PATCH] =?UTF-8?q?gitea:=20fix=20healthcheck=20=E2=80=94=20probe?= =?UTF-8?q?=20/api/healthz=20(was=20404=20on=20/api/v1/version=20pre-insta?= =?UTF-8?q?ll)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surfaced during the unattended deploy sweep: a fresh gitea reported unhealthy because the HC hit /api/v1/version (404 until install-lock); /api/healthz returns 200 while serving. Fixed both the docker HC and the controller .felhom.yml probe; bumped start_period to 90s for first-boot DB migration. Same class as the komga fix. Co-Authored-By: Claude Opus 4.8 (1M context) --- templates/gitea/.felhom.yml | 4 ++-- templates/gitea/docker-compose.yml | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/gitea/.felhom.yml b/templates/gitea/.felhom.yml index 5cc826f..bd62e82 100644 --- a/templates/gitea/.felhom.yml +++ b/templates/gitea/.felhom.yml @@ -57,7 +57,7 @@ healthcheck: checks: - type: api port: 3000 - path: "/api/v1/version" + # /api/healthz is always available (200) once serving; /api/v1/version 404s pre-install-lock. + path: "/api/healthz" expect: status: 200 - body_contains: "version" diff --git a/templates/gitea/docker-compose.yml b/templates/gitea/docker-compose.yml index 78995f1..0777078 100644 --- a/templates/gitea/docker-compose.yml +++ b/templates/gitea/docker-compose.yml @@ -24,12 +24,15 @@ services: resources: limits: memory: 512M + # /api/healthz is gitea's dedicated health endpoint (200 once serving); /api/v1/version returns + # 404 until the install wizard is completed (INSTALL_LOCK), so it falsely reported unhealthy on a + # fresh deploy. The gitea image ships curl (verified). 90s start_period covers first-boot DB migration. healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"] + test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"] interval: 30s timeout: 5s retries: 3 - start_period: 30s + start_period: 90s labels: - "traefik.enable=true" - "traefik.http.routers.gitea.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"