#!/bin/bash
set -e

# Collect static files
echo "Collecting static files..."
python3 manage.py collectstatic --noinput

# Apply database migrations
echo "Applying migrations..."
python3 manage.py migrate --noinput

# Start the application
exec gunicorn --bind 0.0.0.0:8000 config.wsgi:application