From 62f1aecfaf262c0c564de59eae9a024d80a9ec54 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 27 Nov 2019 00:30:45 +0000 Subject: [PATCH] Fix debug mode in entrypoint.sh --- utils/entrypoint.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/utils/entrypoint.sh b/utils/entrypoint.sh index 0296d9de..15587c72 100755 --- a/utils/entrypoint.sh +++ b/utils/entrypoint.sh @@ -12,14 +12,9 @@ if [ -z "$FLASK_DEBUG" ]; then exit 1 fi -ENV="-e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG" - if [ "$FLASK_DEBUG" -eq "1" ]; then - EXTRA="--reload" + FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_RUN_PORT=5123 flask run --host=0.0.0.0 +else + ENV="-e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG" + gunicorn -w 4 -b :5123 $ENV app:app fi - -echo "Running gunicorn with:" -echo " - env: $ENV" -echo " - extra: $EXTRA" - -gunicorn -w 4 -b :5123 $ENV $EXTRA app:app