feat(server): add CONFIG_DIRECTORY env var to control config directory location

This commit is contained in:
sct
2021-01-18 01:15:08 +00:00
parent b0ce0406bb
commit fa8f112c31
3 changed files with 12 additions and 4 deletions

View File

@@ -137,7 +137,11 @@ interface AllSettings {
notifications: NotificationSettings;
}
const SETTINGS_PATH = path.join(__dirname, '../../config/settings.json');
const SETTINGS_PATH = path.join(
__dirname,
'../../',
`${process.env.CONFIG_DIRECTORY || '/config'}/settings.json`
);
class Settings {
private data: AllSettings;