diff --git a/Procfile b/Procfile new file mode 100644 index 0000000000000000000000000000000000000000..68773f6823b88478029e696b61ec7dc203495c68 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn bam:app --log-file - diff --git a/README.md b/README.md index 4df3dff3c04e0ebf9cd8547ad2f028a1cc10f60d..508586e2c29b9bae18416be71c7f6f83e0bfccc6 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ python create_db.py python run.py # Or alternatively, run the production server -sudo python run_prod.py +sudo gunicorn -w 4 -b "0.0.0.0:80" bam:app ``` Tested on Manjaro Linux / Python 3.8.6 diff --git a/requirements.txt b/requirements.txt index dfabc770c037ecefdea256bb79980a4530bfed23..be6d1a7646e917667be52eee12ed364df81f05c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,7 @@ Flask-Bcrypt==0.7.1 Flask-Login==0.5.0 Flask-SQLAlchemy==2.4.4 Flask-WTF==0.14.3 +gunicorn==20.0.4 idna==2.10 itsdangerous==1.1.0 Jinja2==2.11.2 @@ -26,6 +27,5 @@ toml==0.10.2 tornado==6.1 typed-ast==1.4.1 typing-extensions==3.7.4.3 -waitress==1.4.4 Werkzeug==1.0.1 WTForms==2.3.3 diff --git a/run_prod.py b/run_prod.py deleted file mode 100644 index 3732b4d4d91aa502570c23fa1d924b10fd1bbf63..0000000000000000000000000000000000000000 --- a/run_prod.py +++ /dev/null @@ -1,4 +0,0 @@ -from bam import app -from waitress import serve - -serve(app, host="0.0.0.0", port=80)