Files
QPP/run.bash
rattatwinko 9532213adf update some bs
+ readme
+ some change in the bash script using ports
2025-08-17 15:43:11 +02:00

26 lines
533 B
Bash

#!/bin/bash
set -e # exit if any command fails
# Ensure src/database directory exists
mkdir -p src/database
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
python -m venv venv
fi
source venv/bin/activate
# Upgrade pip and install dependencies
pip install --upgrade pip
pip install -r requirements.txt
# Export environment variables
export FLASK_APP=src.app
export FLASK_ENV=production
# Run with Gunicorn
echo "Starting Flask app with Gunicorn..."
exec gunicorn -w 4 -b 0.0.0.0:8000 src.app:app