From 856fc89a7af2dabeb244f69878e1d8c65afd2ef1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 14:13:26 +0000 Subject: [PATCH] fix(health): add root-level /health endpoint for Railway healthcheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- salesflow-saas/backend/app/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salesflow-saas/backend/app/main.py b/salesflow-saas/backend/app/main.py index a915ca5e..1e5b9be4 100644 --- a/salesflow-saas/backend/app/main.py +++ b/salesflow-saas/backend/app/main.py @@ -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")