#!/bin/bash set -e echo "Starting deployment script..." echo "Collecting static files..." # Run collectstatic but allow it to fail without crashing the container immediately, # so we can see the logs if something goes wrong. python manage.py collectstatic --noinput || echo "WARNING: collectstatic failed! Check static files." echo "Applying migrations..." python manage.py migrate echo "Starting Gunicorn..." exec gunicorn config.wsgi:application --bind 0.0.0.0:8000