Skip to content

Commit 38e834a

Browse files
committed
Add debug logs to entrypoint
1 parent f499fbd commit 38e834a

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

backend/entrypoint.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#!/bin/sh
2-
set -e
2+
3+
echo "=== ENTRYPOINT START ==="
4+
echo "PORT: ${PORT:-8000}"
5+
echo "DATABASE_URL set: $(if [ -n "$DATABASE_URL" ]; then echo 'yes'; else echo 'NO!'; fi)"
36

47
echo "Running database migrations..."
5-
alembic upgrade head
8+
alembic upgrade head || { echo "Migration failed!"; exit 1; }
69

710
echo "Seeding database..."
8-
python scripts/seed_data.py || echo "Seed already exists or failed (continuing...)"
11+
python scripts/seed_data.py || echo "Seed skipped or failed (continuing...)"
912

10-
echo "Starting server..."
13+
echo "Starting server on port ${PORT:-8000}..."
1114
exec uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}

0 commit comments

Comments
 (0)