fix: simplify health check to liveness probe
All checks were successful
Build and Push Gitea MCP Docker Image / build (push) Successful in 17s

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.
This commit is contained in:
Ben
2025-12-22 05:16:18 +00:00
parent c0402b4491
commit 418af129af

View File

@@ -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