diff --git a/wrapper.sh b/wrapper.sh index ee7d910..8697093 100755 --- a/wrapper.sh +++ b/wrapper.sh @@ -3,13 +3,15 @@ if [ "$FLASK_ENV" == "production" ]; then export WORKERS=2 export THREADS=2 + export RELOAD="" else cd /pybook_mapped_volume export WORKERS=1 export THREADS=1 + export RELOAD="--reload" fi -sudo -u pybook gunicorn --bind=0.0.0.0:80 --timeout 300 --workers=$WORKERS --threads=$THREADS main:app --env FLASK_ENV="$FLASK_ENV" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output --enable-stdio-inheritance +sudo -u pybook gunicorn --bind=0.0.0.0:80 --timeout 300 --workers=$WORKERS --threads=$THREADS main:app --env FLASK_ENV="$FLASK_ENV" --error-logfile gunicorn.error.log --access-logfile gunicorn.log --capture-output $RELOAD --enable-stdio-inheritance # just in case it fails this keeps the container up so you can check gunicorn logs sleep 99999