16 lines
341 B
Bash
16 lines
341 B
Bash
|
|
#!/bin/sh
|
||
|
|
set -e
|
||
|
|
|
||
|
|
if [ -z "$1" ]; then
|
||
|
|
echo "🔧 Applying database migrations..."
|
||
|
|
python manage.py migrate --noinput
|
||
|
|
|
||
|
|
echo "🧹 Collecting static files..."
|
||
|
|
python manage.py collectstatic --noinput
|
||
|
|
|
||
|
|
echo "🚀 Starting Gunicorn..."
|
||
|
|
exec gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
||
|
|
fi
|
||
|
|
|
||
|
|
exec "$@"
|