From f1e9919d390574eb58bed1c00502c9bc53eaa787 Mon Sep 17 00:00:00 2001 From: r09722050akabennett Date: Wed, 29 Apr 2026 10:04:35 +0800 Subject: [PATCH] fix(docker): use HEAD probe so SSE heartbeat doesn't time out healthcheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `/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) --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index d17f012db..297eab85e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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