diff --git a/module_build_service/config.py b/module_build_service/config.py index 3a08991c..defb5a67 100644 --- a/module_build_service/config.py +++ b/module_build_service/config.py @@ -22,8 +22,10 @@ # SOFTWARE. # # Written by Petr Ĺ abata +# Filip Valder import imp +import os from os import sys @@ -49,6 +51,9 @@ def _init_app_config(app): here = sys.path[0] if any(['nosetests' in arg for arg in sys.argv]): app.config.from_object('%s.TestConfiguration' % conf_module) + elif 'MODULE_BUILD_SERVICE_DEVELOPER_ENV' in os.environ and \ + os.environ['MODULE_BUILD_SERVICE_DEVELOPER_ENV']: + app.config.from_object('%s.DevConfiguration' % conf_module) elif here not in ('/usr/bin', '/bin', '/usr/local/bin'): app.config.from_object('%s.DevConfiguration' % conf_module) else: diff --git a/module_build_service/manage.py b/module_build_service/manage.py index a02b7a4c..f00a6811 100644 --- a/module_build_service/manage.py +++ b/module_build_service/manage.py @@ -291,8 +291,11 @@ def generatelocalhostcert(): def runssl(host=conf.host, port=conf.port, debug=False): """ Runs the Flask app with the HTTPS settings configured in config.py """ - logging.info('Starting Rida') + logging.info('Starting Module Build Service frontend') ssl_ctx = _establish_ssl_context() + if 'MODULE_BUILD_SERVICE_DEVELOPER_ENV' in os.environ and \ + os.environ['MODULE_BUILD_SERVICE_DEVELOPER_ENV']: + debug = True app.run( host=host, port=port,