From 68867e407e3c3c2c0c2e9198b88c17928e18a4fe Mon Sep 17 00:00:00 2001 From: Bill Date: Fri, 31 Oct 2025 14:03:30 -0400 Subject: [PATCH] debug: add FastAPI app import check before starting uvicorn --- entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 23243b5..3cd13bb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -58,6 +58,12 @@ sleep 3 # Note: Container always uses port 8080 internally # The API_PORT env var only affects the host port mapping in docker-compose.yml echo "🌐 Starting FastAPI server on port 8080..." +echo "🔍 Checking if FastAPI app can be imported..." +python -c "from api.main import app; print('✓ App imported successfully')" || { + echo "❌ Failed to import FastAPI app" + exit 1 +} + exec uvicorn api.main:app \ --host 0.0.0.0 \ --port 8080 \