bug fix to account for environment variables

legacy
root 5 years ago
parent d035627d04
commit 0797d82005

@ -28,6 +28,8 @@ import store
from datetime import datetime from datetime import datetime
import numpy as np import numpy as np
import requests import requests
import os
# from utils.transport import Couchdb, CouchdbReader # from utils.transport import Couchdb, CouchdbReader
PORT = 8100 if 'port' not in PARAMS else int(PARAMS['port']) ; PORT = 8100 if 'port' not in PARAMS else int(PARAMS['port']) ;
@ -43,6 +45,9 @@ stripe_keys = {
stripe.api_key = stripe_keys['secret_key'].strip() stripe.api_key = stripe_keys['secret_key'].strip()
if os.environ['CLOUDVIEW_CONTEXT'] and os.environ['CLOUDVIEW_CONTEXT'] not in CONFIG['cloud-view']:
context = os.environ['CLOUDVIEW_CONTEXT']
CONFIG['cloud-view'] = CONFIG['cloud-view'].replace('cloud-view',context)
app = Flask(__name__) app = Flask(__name__)
CORS(app) CORS(app)

Loading…
Cancel
Save