add extra environment settings
This commit is contained in:
parent
cb53728bcd
commit
0a526a84f1
1 changed files with 11 additions and 2 deletions
|
@ -13,9 +13,18 @@ app = Flask(__name__)
|
||||||
|
|
||||||
# setup the environment
|
# setup the environment
|
||||||
SNAP_USER_DATA = os.environ.get('SNAP_USER_DATA')
|
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 SNAP_USER_DATA is None:
|
||||||
|
if CONFIG_FILE is None:
|
||||||
filename = 'config.yaml'
|
filename = 'config.yaml'
|
||||||
|
else:
|
||||||
|
filename = CONFIG_FILE
|
||||||
|
|
||||||
|
if LOG_FILE is None:
|
||||||
log_file = 'webhook.log'
|
log_file = 'webhook.log'
|
||||||
|
else:
|
||||||
|
log_file = LOG_FILE
|
||||||
else:
|
else:
|
||||||
filename = SNAP_USER_DATA + '/config.yaml'
|
filename = SNAP_USER_DATA + '/config.yaml'
|
||||||
log_file = SNAP_USER_DATA + '/webhook.log'
|
log_file = SNAP_USER_DATA + '/webhook.log'
|
||||||
|
|
Reference in a new issue