From 606c8cf7617692347bd6504f50998f6a7666dcb8 Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 23 Apr 2020 15:31:10 +0200 Subject: [PATCH] Add flask command switch to docker-entrypoint again --- docker-entrypoint.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e8cad4f1..b60b3ea2 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -8,5 +8,11 @@ wait-for-it redis:6379 --strict --timeout=0 GUNICORN_WORKERS="${GUNICORN_WORKERS:-1}" source venv/bin/activate -flask deploy -gunicorn --access-logfile - --bind :5000 --error-logfile - --workers "${GUNICORN_WORKERS}" --worker-class eventlet nopaque:app +if [ $# -eq 0 ]; then + flask deploy + gunicorn --access-logfile - --bind :5000 --error-logfile - --workers "${GUNICORN_WORKERS}" --worker-class eventlet nopaque:app +elif [ $1 == "flask" ]; then + flask ${@:2} +else + echo "$0 [flask [options]]" +fi