fix(docker): use HEAD probe so SSE heartbeat doesn't time out healthcheck

`/api/heartbeat` is a `text/event-stream` endpoint that keeps the
connection open and streams events. `curl -fsS` reads until the body
ends, which never happens, so every probe hits the 5s timeout and
Docker marks the server unhealthy — which in turn blocks `gitnexus-web`
from starting via `condition: service_healthy`.

Switch to `curl -fsSI` (HEAD): the server still returns 200 instantly,
but there's no body to read so curl exits cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
r09722050akabennett 2026-04-29 10:04:35 +08:00
parent dafda284bc
commit f1e9919d39

View file

@ -19,7 +19,7 @@ services:
- ${WORKSPACE_DIR:-./workspace}:/workspace:ro
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-fsS', 'http://localhost:4747/api/heartbeat']
test: ['CMD', 'curl', '-fsSI', 'http://localhost:4747/api/heartbeat']
interval: 30s
timeout: 5s
retries: 3