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}`)"