17 lines
387 B
Bash
17 lines
387 B
Bash
#!/bin/sh
|
|
|
|
# Exit immediately if a command exits with a non-zero status
|
|
set -e
|
|
|
|
# Apply database migrations
|
|
echo "Applying database migrations..."
|
|
python manage.py migrate
|
|
|
|
# Collect static files
|
|
echo "Collecting static files..."
|
|
python manage.py collectstatic --noinput
|
|
|
|
# Start Gunicorn
|
|
echo "Starting Gunicorn..."
|
|
exec gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3
|