Merge pull request #547 from Jamesits/master

fix #542
This commit is contained in:
Khanh Ngo 2019-09-16 11:49:04 +07:00 committed by GitHub
commit 89ac98acfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,12 +5,13 @@ cd /opt/powerdns-admin
GUNICORN_TIMEOUT="${GUINCORN_TIMEOUT:-120}" GUNICORN_TIMEOUT="${GUINCORN_TIMEOUT:-120}"
GUNICORN_WORKERS="${GUNICORN_WORKERS:-4}" GUNICORN_WORKERS="${GUNICORN_WORKERS:-4}"
GUNICORN_LOGLEVEL="${GUNICORN_LOGLEVEL:-info}" GUNICORN_LOGLEVEL="${GUNICORN_LOGLEVEL:-info}"
BIND_ADDRESS="${BIND_ADDRESS:-0.0.0.0:80}"
if [ ! -f ./config.py ]; then if [ ! -f ./config.py ]; then
cat ./config_template.py ./docker/Production/config_docker.py > ./config.py cat ./config_template.py ./docker/Production/config_docker.py > ./config.py
fi fi
GUNICORN_ARGS="-t ${GUNICORN_TIMEOUT} --workers ${GUNICORN_WORKERS} --bind 0.0.0.0:80 --log-level ${GUNICORN_LOGLEVEL}" GUNICORN_ARGS="-t ${GUNICORN_TIMEOUT} --workers ${GUNICORN_WORKERS} --bind ${BIND_ADDRESS} --log-level ${GUNICORN_LOGLEVEL}"
if [ "$1" == gunicorn ]; then if [ "$1" == gunicorn ]; then
flask db upgrade flask db upgrade
exec "$@" $GUNICORN_ARGS exec "$@" $GUNICORN_ARGS