fix(health): add root-level /health endpoint for Railway healthcheck

Railway checks /health but all API routes are under /api/v1/.
This adds a lightweight root /health endpoint that returns
{"status": "ok"} — no auth, no DB, no middleware blocking.

This fixes the "1/1 replicas never became healthy" Railway error.

https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
This commit is contained in:
Claude 2026-04-23 14:13:26 +00:00
parent 874a562188
commit 856fc89a7a
No known key found for this signature in database

View File

@ -115,6 +115,13 @@ app.add_middleware(
allow_headers=["*"],
)
@app.get("/health")
async def root_health():
"""Root-level health check for Railway/load balancer healthchecks."""
return {"status": "ok"}
# API Routes
app.include_router(api_router, prefix="/api/v1")