initial commit

This commit is contained in:
Adam Rabjerg
2021-06-19 13:40:53 +02:00
commit f1faca41d1
7 changed files with 89 additions and 0 deletions

17
run.sh Executable file
View 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