Spaces:
Sleeping
Sleeping
File size: 895 Bytes
23654e5 d038974 23654e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#!/bin/bash
# Quick start script for production deployment
set -e
echo "π Starting Participatory Planning Application..."
# Check if venv exists
if [ ! -d "venv" ]; then
echo "β Virtual environment not found. Please run setup first."
exit 1
fi
# Activate virtual environment
source venv/bin/activate
# Check if gunicorn is installed
if ! command -v gunicorn &> /dev/null; then
echo "π¦ Installing gunicorn..."
pip install gunicorn==21.2.0
fi
# Check environment variables
if [ ! -f ".env" ]; then
echo "β .env file not found. Please create it first."
exit 1
fi
# Start application
echo "β
Starting server on port 8000..."
echo "π Access at: http://$(hostname -I | awk '{print $1}'):8000"
echo "π Admin token: Check startup logs or set ADMIN_TOKEN in .env"
echo ""
echo "Press Ctrl+C to stop"
echo ""
gunicorn --config gunicorn_config.py wsgi:app
|