From 418af129af1ba9b249c0f6a8b0de49bf4d63a5f9 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 22 Dec 2025 05:16:18 +0000 Subject: [PATCH] fix: simplify health check to liveness probe Health check no longer validates Gitea connectivity - this is checked when tools are actually called. Fixes Docker health check failures when container networking can't resolve external Gitea URL. --- server.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/server.py b/server.py index 3fcf506..adfd695 100644 --- a/server.py +++ b/server.py @@ -338,14 +338,12 @@ async def gitea_api_call( async def health_check(request): - """Health check endpoint for Docker/Kubernetes.""" - is_healthy = await client.health_check() - if is_healthy: - return JSONResponse({"status": "ok", "gitea_url": GITEA_URL}) - return JSONResponse( - {"status": "unhealthy", "message": "Cannot connect to Gitea"}, - status_code=503, - ) + """Health check endpoint for Docker/Kubernetes. + + This is a liveness probe - it just confirms the server is running. + Gitea connectivity is validated when tools are actually called. + """ + return JSONResponse({"status": "ok", "gitea_url": GITEA_URL}) @asynccontextmanager