diff options
| author | rubenwardy <rw@rubenwardy.com> | 2019-11-14 22:24:37 +0000 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2019-11-14 22:24:37 +0000 |
| commit | df247b021e3a5c6be4a633aaccb7bcdf50e28740 (patch) | |
| tree | c2b8a7b80a88ea97ee5b722d7b2a35e563e2e0bd /utils | |
| parent | 9f678d8fde5b807a8abec384419f34294cedaeef (diff) | |
| download | cheatdb-df247b021e3a5c6be4a633aaccb7bcdf50e28740.tar.xz | |
Improve docker image and deployment scripts
Diffstat (limited to 'utils')
| -rwxr-xr-x | utils/run.sh | 11 | ||||
| -rwxr-xr-x | utils/rundebug.sh | 3 | ||||
| -rwxr-xr-x | utils/runprod.sh | 3 | ||||
| -rw-r--r-- | utils/runprodguni.sh | 3 |
4 files changed, 11 insertions, 9 deletions
diff --git a/utils/run.sh b/utils/run.sh new file mode 100755 index 0000000..3d19d84 --- /dev/null +++ b/utils/run.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Debug +# FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_DEBUG=1 python3 -m flask run -h 0.0.0.0 -p 5123 + +if [ -z "$FLASK_DEBUG" ]; then + echo "FLASK_DEBUG is required in config.env" + exit 1 +fi + +gunicorn -w 4 -b :5123 -e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=$FLASK_DEBUG app:app diff --git a/utils/rundebug.sh b/utils/rundebug.sh deleted file mode 100755 index 31e9137..0000000 --- a/utils/rundebug.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_DEBUG=1 python3 -m flask run -h 0.0.0.0 -p 5123 diff --git a/utils/runprod.sh b/utils/runprod.sh deleted file mode 100755 index c64450c..0000000 --- a/utils/runprod.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -FLASK_APP=app/__init__.py FLASK_CONFIG=../config.cfg FLASK_DEBUG=0 python3 -m flask run -h 0.0.0.0 -p 5123 diff --git a/utils/runprodguni.sh b/utils/runprodguni.sh deleted file mode 100644 index 68c6962..0000000 --- a/utils/runprodguni.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -gunicorn -w 4 -b :5123 -e FLASK_APP=app/__init__.py -e FLASK_CONFIG=../config.cfg -e FLASK_DEBUG=0 app:app |
