zkt25/myproject/start-app.sh
2025-03-19 12:06:42 +01:00

21 lines
410 B
Bash
Executable File

#!/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"