mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
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
This commit is contained in:
parent
ce1a2dcbc3
commit
8ddf5bf40d
@ -1,4 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# start.sh — Railway-compatible start script
|
echo "[dealix] Starting on port ${PORT:-8000}..."
|
||||||
# Uses $PORT from Railway (default 8000 if not set)
|
echo "[dealix] Python: $(python3 --version)"
|
||||||
exec uvicorn app.main:app --host 0.0.0.0 --port "${PORT:-8000}" --workers 2
|
echo "[dealix] Testing imports..."
|
||||||
|
python3 -c "from app.main import app; print(f'[dealix] Routes: {len(app.routes)}'); print('[dealix] Import OK')" 2>&1 || { echo "[dealix] IMPORT FAILED"; exit 1; }
|
||||||
|
echo "[dealix] Launching uvicorn..."
|
||||||
|
exec uvicorn app.main:app --host 0.0.0.0 --port "${PORT:-8000}" --workers 1 --timeout-keep-alive 30
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user