gitea: fix healthcheck — probe /api/healthz (was 404 on /api/v1/version pre-install)
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) <noreply@anthropic.com>
This commit is contained in:
@@ -57,7 +57,7 @@ healthcheck:
|
|||||||
checks:
|
checks:
|
||||||
- type: api
|
- type: api
|
||||||
port: 3000
|
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:
|
expect:
|
||||||
status: 200
|
status: 200
|
||||||
body_contains: "version"
|
|
||||||
|
|||||||
@@ -24,12 +24,15 @@ services:
|
|||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: 512M
|
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:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000/api/v1/version"]
|
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 30s
|
start_period: 90s
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.gitea.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
- "traefik.http.routers.gitea.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
|
||||||
|
|||||||
Reference in New Issue
Block a user