aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-11-27 00:30:45 +0000
committerrubenwardy <rw@rubenwardy.com>2019-11-27 01:06:58 +0000
commit62f1aecfaf262c0c564de59eae9a024d80a9ec54 (patch)
tree2a8ab1e8a3acb5d685df56a53ae6dac9f29ae31c
parent4ce388c8aa5d5502408609983535a9812d41d6d1 (diff)
downloadcheatdb-62f1aecfaf262c0c564de59eae9a024d80a9ec54.tar.xz
Fix debug mode in entrypoint.sh
-rwxr-xr-xutils/entrypoint.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/utils/entrypoint.sh b/utils/entrypoint.sh
index 0296d9d..15587c7 100755
--- a/utils/entrypoint.sh
+++ b/utils/entrypoint.sh
@@ -12,14 +12,9 @@ if [ -z "$FLASK_DEBUG" ]; then
exit 1
fi
-ENV="-e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG"
-
if [ "$FLASK_DEBUG" -eq "1" ]; then
- EXTRA="--reload"
+ FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_RUN_PORT=5123 flask run --host=0.0.0.0
+else
+ ENV="-e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG"
+ gunicorn -w 4 -b :5123 $ENV app:app
fi
-
-echo "Running gunicorn with:"
-echo " - env: $ENV"
-echo " - extra: $EXTRA"
-
-gunicorn -w 4 -b :5123 $ENV $EXTRA app:app