File size: 553 Bytes
24e6f5b ddde0db 24e6f5b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/bin/bash
# Exit on error
set -e
echo "Starting FinMK Backend..."
# Apply migrations at runtime to handle any DB schema changes for SQLite (Auth/Admin)
echo "Applying database migrations..."
python manage.py migrate --noinput
# Collect static files (if not already done in build)
# echo "Collecting static files..."
# python manage.py collectstatic --noinput
# Set default port if not set
export PORT="${PORT:-7860}"
# Start Gunicorn
echo "Starting Gunicorn on port $PORT..."
exec gunicorn expense_tracker.wsgi:application -c gunicorn_config.py
|