#!/bin/sh # Exit immediately if a command exits with a non-zero status set -e # Initialize database echo "Initializing database..." flask init-db # Seed database echo "Seeding database..." flask seed-db # Start Gunicorn # Use PORT environment variable if set, otherwise default to 5000 PORT=${PORT:-5000} echo "Starting Gunicorn on port $PORT..." exec gunicorn -w 4 -b 0.0.0.0:$PORT app:app