Gurucool_Test / start.sh
ashwinR's picture
Update start.sh
4378bc0
raw
history blame
295 Bytes
#!/bin/bash
# Wait for PostgreSQL to become ready
while ! pg_isready -q -h localhost -p 5432 -U postadmin; do
echo "$(date) - waiting for database to start"
sleep 2
done
# Run migrations
alembic upgrade head
# Start the FastAPI app using Uvicorn
uvicorn app:app --host 0.0.0.0 --port 7860