system-prompts-and-models-o.../salesflow-saas/backend/start.sh
Claude e5aa1cade6
fix(railway): healthcheck path + dynamic PORT + start.sh wrapper
Railway healthcheck was failing because:
1. healthcheckPath was /api/v1/health but endpoint is /health
2. CMD used hardcoded port 8000, Railway injects $PORT dynamically
3. ${PORT:-8000} doesn't expand without shell

Fix:
- railway.toml: healthcheckPath = "/health"
- start.sh: shell wrapper that expands $PORT properly
- Dockerfile CMD: ["./start.sh"] instead of direct uvicorn
- HEALTHCHECK: uses /health (matches root endpoint)
- start-period increased to 90s for cold start

https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-25 19:38:32 +00:00

5 lines
185 B
Bash
Executable File

#!/bin/sh
# start.sh — Railway-compatible start script
# Uses $PORT from Railway (default 8000 if not set)
exec uvicorn app.main:app --host 0.0.0.0 --port "${PORT:-8000}" --workers 2