diff --git a/README.md b/README.md index 9f88dd6..0255d96 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ $ pip install -r requirements.txt ### Run the server ``` -$ make serve +$ make dev-serve ``` ### Layers of the Onion diff --git a/makefile b/makefile index ff4b308..b21e29f 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,14 @@ -ARCHIVE_DIR := ./vocoder/archive +PROD_PORT := :9090 +PROD_WORKERS := 4 +ARCHIVE_DIR := ./vocoder/archive default: serve -serve: +dev-serve: @FLASK_ENV=development FLASK_APP=vocoder.server flask run clear-archive: @rm -rf $(ARCHIVE_DIR)/* + +prod-serve: + @gunicorn --workers $(PROD_WORKERS) --bind $(PROD_PORT) vocoder.server:app diff --git a/requirements.txt b/requirements.txt index c69630d..b72cea9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,4 @@ -Flask==1.1.1 -Flask-Cors==3.0.8 +fabric==2.5.0 +flask-cors==3.0.8 +flask==1.1.1 +gunicorn==20.0.4