Load parameters from environment

This commit is contained in:
nukeop 2016-12-29 17:22:22 +01:00
parent 9fc237059e
commit 34c3e5db2a

View file

@ -23,6 +23,13 @@ if ('APPBRAND' in conf.config and
'APPBRAND' in os.environ): 'APPBRAND' in os.environ):
conf.add(('APPBRAND', os.environ['APPBRAND'])) conf.add(('APPBRAND', os.environ['APPBRAND']))
# Load admin key and secret key from environment
if 'ADMINSECRET' in os.environ:
conf.add(('ADMINSECRET', os.environ['ADMINSECRET']))
if 'SECRETKEY' in os.environ:
conf.add(('SECRETKEY', os.environ['SECRETKEY']))
# Set the secret key # Set the secret key
if 'SECRETKEY' in conf.config: if 'SECRETKEY' in conf.config:
app.secret_key = conf.config['SECRETKEY'] app.secret_key = conf.config['SECRETKEY']