add extra environment settings

This commit is contained in:
Morgan McMillian 2022-09-27 11:19:00 -07:00
parent cb53728bcd
commit 0a526a84f1

View file

@ -13,9 +13,18 @@ app = Flask(__name__)
# setup the environment
SNAP_USER_DATA = os.environ.get('SNAP_USER_DATA')
CONFIG_FILE = os.environ.get('CONFIG_FILE')
LOG_FILE = os.environ.get('LOG_FILE')
if SNAP_USER_DATA is None:
if CONFIG_FILE is None:
filename = 'config.yaml'
else:
filename = CONFIG_FILE
if LOG_FILE is None:
log_file = 'webhook.log'
else:
log_file = LOG_FILE
else:
filename = SNAP_USER_DATA + '/config.yaml'
log_file = SNAP_USER_DATA + '/webhook.log'