initial commit
This commit is contained in:
17
run.sh
Executable file
17
run.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source ./venv/bin/activate
|
||||
export FLASK_APP=flask_webhook_server.py
|
||||
|
||||
if [[ -z "$APP_DEPLOYMENT_TYPE" ]]; then
|
||||
export APP_DEPLOYMENT_TYPE=private
|
||||
echo -e "APP_DEPLOYMENT_TYPE not set \nIn order to set it to public: \"export APP_DEPLOYMENT_TYPE=public\""
|
||||
fi
|
||||
|
||||
if [[ "$APP_DEPLOYMENT_TYPE" == "public" ]]; then
|
||||
echo -e "Running app in \"Public mode\", app is exposed to the network!"
|
||||
/usr/bin/env python -m flask run --host=0.0.0.0
|
||||
else
|
||||
echo -e "Running app in \"Private mode\", app is NOT exposed to the network and only available to localhost."
|
||||
/usr/bin/env python -m flask run
|
||||
fi
|
||||
Reference in New Issue
Block a user