Gurucool_Test / start.sh
ashwinR's picture
Update start.sh
7e56007
raw
history blame
366 Bytes
#!/bin/bash
# Start Redis
service redis-server start
# Start PostgreSQL
service postgresql start
# Wait for PostgreSQL
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