Compare commits
4 Commits
a049610291
...
v1.0.7
Author | SHA1 | Date | |
---|---|---|---|
ca176e1a76 | |||
54656f2630 | |||
f38b0c69d9 | |||
b1ba08933a
|
@@ -47,6 +47,7 @@ You can override the configuration options using environment variables. The foll
|
||||
- `BASE_DIR`: Overrides `General.BaseDir`
|
||||
- `FORMAT`: Overrides `General.Format`
|
||||
- `TEMP_BASE_DIR`: Overrides `General.TempBaseDir`
|
||||
- `ENABLE_CONSOLE`: Overrides `General.EnableConsole` (set to `true` or `false`)
|
||||
- `WATCHED_FOLDER`: Overrides `WatchFolder.Path`
|
||||
- `USE_POLLING`: Overrides `WatchFolder.UsePolling` (set to `true` or `false`)
|
||||
- `USE_INOTIFY`: Overrides `WatchFolder.UseInotify` (set to `true` or `false`)
|
||||
|
@@ -69,6 +69,9 @@ func overrideConfigWithEnv() {
|
||||
if envTempBaseDir := os.Getenv("TEMP_BASE_DIR"); envTempBaseDir != "" {
|
||||
config.General.TempBaseDir = envTempBaseDir
|
||||
}
|
||||
if envEnableConsole := os.Getenv("ENABLE_CONSOLE"); envEnableConsole != "" {
|
||||
config.General.EnableConsole = strings.ToLower(envEnableConsole) == "true"
|
||||
}
|
||||
if envWatchedFolder := os.Getenv("WATCHED_FOLDER"); envWatchedFolder != "" {
|
||||
config.WatchFolder.Path = envWatchedFolder
|
||||
}
|
||||
|
Reference in New Issue
Block a user