Add env variable to change configuration file path.

ETEBASE_EASY_CONFIG_PATH is optional, the server serches for the
configurations files in this order:
- "ETEBASE_EASY_CONFIG_PATH"
- etebase-server.ini
- /etc/etebase-server/etebase-server.ini
master
Victor R. Santos 4 years ago committed by Tom Hacohen
parent 47103df48a
commit e9de8f1adb

@ -141,7 +141,12 @@ MEDIA_URL = '/user-media/'
# Define where to find configuration files
config_locations = ['etebase-server.ini', '/etc/etebase-server/etebase-server.ini']
config_locations = [
os.environ.get('ETEBASE_EASY_CONFIG_PATH', ''),
'etebase-server.ini',
'/etc/etebase-server/etebase-server.ini',
]
# Use config file if present
if any(os.path.isfile(x) for x in config_locations):
config = configparser.ConfigParser()

Loading…
Cancel
Save