Skip to content
Snippets Groups Projects
Commit f4ad9690 authored by David Douard's avatar David Douard
Browse files

Make it possible to specify the config file via SWH_CONFIG_FILENAME env var

so that we have a chance to explicitely choose the config file used when
running the wsgi app using a wsgi server like gunicorn.
parent f0ad1f01
No related branches found
No related tags found
1 merge request!37Refactor Vault a bit, mainly pytest, config and BaseDb-based VaultBackend
This commit is part of merge request !37. Comments created here will be created in the context of that merge request.
...@@ -228,6 +228,7 @@ def get_local_backend(config_file): ...@@ -228,6 +228,7 @@ def get_local_backend(config_file):
def make_app_from_configfile(config_file=DEFAULT_CONFIG_PATH, **kwargs): def make_app_from_configfile(config_file=DEFAULT_CONFIG_PATH, **kwargs):
config_file = os.environ.get('SWH_CONFIG_FILENAME', config_file)
vault = get_local_backend(config_file) vault = get_local_backend(config_file)
return make_app(backend=vault, **kwargs) return make_app(backend=vault, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment