FinMK / backend /start.sh
Kumar
Refactor: Achieve Perfect Deployment by standardizing on port 7860 and hardening security
ddde0db
#!/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