devicehub entrypoint: put one worker
This commit is contained in:
parent
a0b14461b3
commit
c4dff2afb6
|
@ -214,7 +214,8 @@ main() {
|
||||||
# 17. Use gunicorn
|
# 17. Use gunicorn
|
||||||
# thanks https://akira3030.github.io/formacion/articulos/python-flask-gunicorn-docker.html
|
# thanks https://akira3030.github.io/formacion/articulos/python-flask-gunicorn-docker.html
|
||||||
if [ "${DEPLOYMENT:-}" = "PROD" ]; then
|
if [ "${DEPLOYMENT:-}" = "PROD" ]; then
|
||||||
gunicorn --access-logfile - --error-logfile - --workers 4 -b :5000 app:app
|
# TODO workers 1 because we have a shared secret in RAM
|
||||||
|
gunicorn --access-logfile - --error-logfile - --workers 1 -b :5000 app:app
|
||||||
else
|
else
|
||||||
# run development server
|
# run development server
|
||||||
FLASK_DEBUG=1 flask run --host=0.0.0.0 --port 5000
|
FLASK_DEBUG=1 flask run --host=0.0.0.0 --port 5000
|
||||||
|
|
Reference in a new issue