automate migrations in docker

This commit is contained in:
2025-10-19 10:46:44 +03:30
parent 48b4894c13
commit fe1115dbd3
4 changed files with 15 additions and 6 deletions

View File

@@ -1,6 +1,15 @@
#!/bin/sh
set -e
echo "🚀 Make migrations..."
python manage.py migrate --noinput
echo "🚀 Applying database migrations..."
python manage.py migrate --noinput
echo "🎯 Collect static files..."
python manage.py collectstatic --noinput
echo "✅ Starting Django server..."
python manage.py runserver 0.0.0.0:5000
exec "$@"