Claude Code commited on
Commit
d173fe5
·
1 Parent(s): 2417977

Claude Code: Fix health endpoint to return 'ok' status, add 3s startup delay

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. entrypoint.sh +4 -0
app.py CHANGED
@@ -53,8 +53,8 @@ def get_app():
53
 
54
  @app.get("/health")
55
  async def health():
56
- """Health check endpoint for external monitoring."""
57
- return {"status": "healthy", "uptime": round(time.time() - START_TIME, 2)}
58
 
59
  @app.exception_handler(Exception)
60
  async def global_exception_handler(request: Request, exc: Exception):
 
53
 
54
  @app.get("/health")
55
  async def health():
56
+ """Health check endpoint for Docker logs."""
57
+ return {"status": "ok"}
58
 
59
  @app.exception_handler(Exception)
60
  async def global_exception_handler(request: Request, exc: Exception):
entrypoint.sh CHANGED
@@ -32,6 +32,10 @@ ls -la /app/*.py 2>/dev/null || echo " (no .py files in /app root)"
32
 
33
  echo ""
34
  echo "=========================================="
 
 
 
 
35
  echo "Starting uvicorn with auto-restart on crash..."
36
  echo "=========================================="
37
 
 
32
 
33
  echo ""
34
  echo "=========================================="
35
+ echo "Waiting 3 seconds before starting uvicorn..."
36
+ echo "=========================================="
37
+ sleep 3
38
+ echo "=========================================="
39
  echo "Starting uvicorn with auto-restart on crash..."
40
  echo "=========================================="
41