Spaces:
Sleeping
Sleeping

Refactor Docker setup: update docker-compose.yml to define app and db services, adjust ports, and configure environment variables; modify Dockerfile to use Python base image, install necessary dependencies, and set up application structure.
63f90ce
set -e | |
# Wait for database to be ready (if using PostgreSQL) | |
if [ "$DATABASE_URL" != "${DATABASE_URL#postgresql://}" ]; then | |
echo "Waiting for PostgreSQL to be ready..." | |
while ! nc -z db 5432; do | |
sleep 0.1 | |
done | |
echo "PostgreSQL is ready" | |
fi | |
# Run database migrations | |
echo "Running database migrations..." | |
alembic upgrade head | |
# Start the application | |
echo "Starting the application..." | |
exec python -m app.main |