powerdns-admin/docker/entrypoint.sh

18 lines
455 B
Bash
Raw Normal View History

#!/bin/sh
set -euo pipefail
2019-12-04 04:50:46 +00:00
cd /app
2019-07-12 09:10:15 +00:00
2020-12-23 16:23:32 +00:00
GUNICORN_TIMEOUT="${GUNICORN_TIMEOUT:-120}"
GUNICORN_WORKERS="${GUNICORN_WORKERS:-4}"
GUNICORN_LOGLEVEL="${GUNICORN_LOGLEVEL:-info}"
BIND_ADDRESS="${BIND_ADDRESS:-0.0.0.0:80}"
GUNICORN_ARGS="-t ${GUNICORN_TIMEOUT} --workers ${GUNICORN_WORKERS} --bind ${BIND_ADDRESS} --log-level ${GUNICORN_LOGLEVEL}"
2019-07-12 09:10:15 +00:00
if [ "$1" == gunicorn ]; then
/bin/sh -c "flask db upgrade"
exec "$@" $GUNICORN_ARGS
2019-07-12 09:10:15 +00:00
else
exec "$@"
fi