aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/run.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/utils/run.sh b/utils/run.sh
index 3d19d84..dee2a54 100755
--- a/utils/run.sh
+++ b/utils/run.sh
@@ -8,4 +8,14 @@ if [ -z "$FLASK_DEBUG" ]; then
exit 1
fi
-gunicorn -w 4 -b :5123 -e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG app:app
+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"
+fi
+
+echo "Running gunicorn with:"
+echo " - env: $ENV"
+echo " - extra: $EXTRA"
+
+gunicorn -w 4 -b :5123 $ENV $EXTRA app:app