17 lines
611 B
Bash
Executable File
17 lines
611 B
Bash
Executable File
#!/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 |