#!/bin/bash set -e # Exit on any error echo "Starting app..." # Start application using docker-compose docker-compose up -d echo "Waiting for database to be ready..." until docker exec myproject-db-1 pg_isready -U postgres; do sleep 2 docker-compose exec web python manage.py migrate done echo "Database is ready, starting Django application..." echo "The app is available at http://localhost:8000"