md for database as it was fucked up in windows script
This commit is contained in:
42
run.bash
42
run.bash
@@ -1,17 +1,25 @@
|
||||
u!/bin/bash
|
||||
|
||||
set -e # exit if any command fails
|
||||
|
||||
# Ensure QPP/database directory exists
|
||||
mkdir -p src/database
|
||||
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
export FLASK_APP=src.app
|
||||
export FLASK_ENV=production
|
||||
|
||||
flask run --host=0.0.0.0 --port=5000
|
||||
#!/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:5000 src.app:app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user