zkt25/sk1/myproject/start-app.sh
Santhosh 6a0b81d888 ssk
2025-04-30 10:02:24 +02: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"