#!/bin/bash # Start Redis service redis-server start # Start PostgreSQL service postgresql start # Wait for PostgreSQL to start until pg_isready -U postgres; do echo "Waiting for PostgreSQL..." sleep 2 done # Create user and database sudo -u postgres psql -c "CREATE USER postadmin WITH PASSWORD 'postpass';" sudo -u postgres psql -c "CREATE DATABASE siksalaya;" sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE siksalaya TO postadmin;" # Run migrations alembic upgrade head # Start the FastAPI app using Uvicorn uvicorn app:app --host 0.0.0.0 --port 7860