Enable hot code reloading

This commit is contained in:
rubenwardy 2019-11-14 23:38:29 +00:00
parent 50892ce9fc
commit 719a652235

@ -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