feat: automate virtual environment setup and use exec for gunicorn process management

This commit is contained in:
2026-06-19 19:12:53 +01:00
parent 07c9da8a80
commit e43c4a7f2a
+13 -1
View File
@@ -1,4 +1,16 @@
#!/bin/bash #!/bin/bash
if [ ! -d "venv" ]; then
echo "Creating virtual environment in 'venv'..."
python3 -m venv venv
source venv/bin/activate
if [ -f "requirements.txt" ]; then
echo "Installing requirements..."
pip install -r requirements.txt
fi
else
source venv/bin/activate
fi
cd frontend && npm run build && cd .. cd frontend && npm run build && cd ..
gunicorn --bind 0.0.0.0:5000 --workers 1 --worker-class geventwebsocket.gunicorn.workers.GeventWebSocketWorker app:app --log-level info exec gunicorn --bind 0.0.0.0:5000 --workers 1 --worker-class geventwebsocket.gunicorn.workers.GeventWebSocketWorker app:app --log-level info