fix(health): add root /health 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

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
VoXc2 2026-04-23 17:13:44 +03:00 committed by GitHub
parent f75e7c331e
commit 35962de933
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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