Commit Graph

4 Commits

Author SHA1 Message Date
Claude
6d797dc0d2
fix: root cause — sqlite_patch not applied when DATABASE_URL empty
Root cause: sqlite_patch checked `if "sqlite" in db_url` but db_url
was empty string when DATABASE_URL env var not set. Patch was skipped,
then models used PostgreSQL types (JSONB/Vector) with SQLite compiler
causing crash: "can't render element of type JSONB".

Fix: `if not db_url or "sqlite" in db_url` — apply patch when URL
is empty (defaults to SQLite anyway in database.py).

Also:
- Dockerfile: add libxml2/libxslt1.1 for lxml runtime
- Dockerfile: increase healthcheck start-period to 120s
- start.sh: log DATABASE_URL prefix for debugging

https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-26 01:16:57 +00:00
Claude
5e9c097bcd
fix: verbose start.sh — prints import errors clearly 2026-04-25 21:05:09 +00:00
Claude
8ddf5bf40d
fix: start.sh with import pre-check + single worker for Railway
Adds import verification before uvicorn starts — if imports fail,
container exits immediately with clear error instead of timing out
on healthcheck. Single worker to reduce memory usage on Railway.

https://claude.ai/code/session_01W1rJthWDkasijTdXCfxVHs
2026-04-25 20:40:34 +00:00
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