2025-01-17 00:29:43 +01:00
|
|
|
#!/bin/bash
|
2025-01-16 14:20:20 +01:00
|
|
|
|
|
|
|
# Wait for postgres to be ready
|
|
|
|
while ! nc -z db 5432; do
|
|
|
|
echo "Waiting for postgres..."
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "PostgreSQL started"
|
|
|
|
|
|
|
|
# Apply database migrations
|
|
|
|
echo "Applying database migrations..."
|
|
|
|
python manage.py migrate
|
|
|
|
|
|
|
|
# Start server
|
|
|
|
echo "Starting server..."
|
|
|
|
python manage.py runserver 0.0.0.0:8000
|