From 5e9c097bcd3e7d6692a0d8ef4981a3b5423cd697 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 25 Apr 2026 21:05:09 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20verbose=20start.sh=20=E2=80=94=20prints?= =?UTF-8?q?=20import=20errors=20clearly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- salesflow-saas/backend/start.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/salesflow-saas/backend/start.sh b/salesflow-saas/backend/start.sh index b3d2dd03..c53de262 100755 --- a/salesflow-saas/backend/start.sh +++ b/salesflow-saas/backend/start.sh @@ -1,7 +1,16 @@ #!/bin/sh -echo "[dealix] Starting on port ${PORT:-8000}..." -echo "[dealix] Python: $(python3 --version)" +set -e +echo "[dealix] PORT=$PORT" 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 +python3 -c " +try: + 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