add --reload for non prod
This commit is contained in:
@@ -3,13 +3,15 @@
|
|||||||
if [ "$FLASK_ENV" == "production" ]; then
|
if [ "$FLASK_ENV" == "production" ]; then
|
||||||
export WORKERS=2
|
export WORKERS=2
|
||||||
export THREADS=2
|
export THREADS=2
|
||||||
|
export RELOAD=""
|
||||||
else
|
else
|
||||||
cd /pybook_mapped_volume
|
cd /pybook_mapped_volume
|
||||||
export WORKERS=1
|
export WORKERS=1
|
||||||
export THREADS=1
|
export THREADS=1
|
||||||
|
export RELOAD="--reload"
|
||||||
fi
|
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
|
# just in case it fails this keeps the container up so you can check gunicorn logs
|
||||||
sleep 99999
|
sleep 99999
|
||||||
|
|||||||
Reference in New Issue
Block a user