1
0
mirror of https://github.com/etesync/server synced 2024-11-22 00:38:07 +00:00

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
This commit is contained in:
Victor R. Santos 2020-11-07 16:21:34 -03:00 committed by Tom Hacohen
parent 47103df48a
commit e9de8f1adb

View File

@ -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()