Fix debug mode in entrypoint.sh

This commit is contained in:
rubenwardy 2019-11-27 00:30:45 +00:00
parent 4ce388c8aa
commit 62f1aecfaf

@ -12,14 +12,9 @@ if [ -z "$FLASK_DEBUG" ]; then
exit 1 exit 1
fi fi
ENV="-e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG"
if [ "$FLASK_DEBUG" -eq "1" ]; then 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 fi
echo "Running gunicorn with:"
echo " - env: $ENV"
echo " - extra: $EXTRA"
gunicorn -w 4 -b :5123 $ENV $EXTRA app:app