From 2b12c9bd0d4c8065bcfbe1220bf28b8e5c835595 Mon Sep 17 00:00:00 2001 From: Benjamin Bohard Date: Wed, 8 Apr 2020 17:20:13 +0200 Subject: [PATCH] Fetch environment variable if possible --- src/risotto/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/risotto/config.py b/src/risotto/config.py index 946e9773..a0f884cc 100644 --- a/src/risotto/config.py +++ b/src/risotto/config.py @@ -1,8 +1,8 @@ from os import environ -CONFIGURATION_DIR = 'configurations' -PROVIDER_FACTORY_CONFIG_DIR = environ.get('PROVIDER_FACTORY_CONFIG_DIR', 'factory') +CONFIGURATION_DIR = environ.get('CONFIGURATION_DIR', '/srv/risotto/configurations') +PROVIDER_FACTORY_CONFIG_DIR = environ.get('PROVIDER_FACTORY_CONFIG_DIR', '/srv/factory') TMP_DIR = 'tmp' DEFAULT_USER = environ.get('DEFAULT_USER', 'Anonymous') RISOTTO_DB_NAME = environ.get('RISOTTO_DB_NAME', 'risotto') @@ -30,6 +30,7 @@ def get_config(): 'http_server': {'port': 8080, 'default_user': DEFAULT_USER}, 'global': {'message_root_path': MESSAGE_PATH, + 'configurations_dir': CONFIGURATION_DIR, 'debug': True, 'internal_user': 'internal', 'check_role': True,