mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-18 15:29:36 +00:00
fix: verbose start.sh — prints import errors clearly
This commit is contained in:
parent
8ddf5bf40d
commit
5e9c097bcd
@ -1,7 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
echo "[dealix] Starting on port ${PORT:-8000}..."
|
set -e
|
||||||
echo "[dealix] Python: $(python3 --version)"
|
echo "[dealix] PORT=$PORT"
|
||||||
echo "[dealix] Testing imports..."
|
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; }
|
python3 -c "
|
||||||
echo "[dealix] Launching uvicorn..."
|
try:
|
||||||
exec uvicorn app.main:app --host 0.0.0.0 --port "${PORT:-8000}" --workers 1 --timeout-keep-alive 30
|
from app.main import app
|
||||||
|
print(f'[dealix] OK — {len(app.routes)} routes')
|
||||||
|
except Exception as e:
|
||||||
|
print(f'[dealix] IMPORT FAILED: {e}')
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
exit(1)
|
||||||
|
" 2>&1
|
||||||
|
echo "[dealix] Starting uvicorn on port ${PORT:-8000}..."
|
||||||
|
exec uvicorn app.main:app --host 0.0.0.0 --port "${PORT:-8000}" --workers 1 --log-level info
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user