Added more config paths (#55)
This commit is contained in:
parent
8362799a93
commit
08cbd18bc5
2 changed files with 11 additions and 1 deletions
|
@ -17,6 +17,15 @@ first:
|
|||
child: true
|
||||
```
|
||||
|
||||
## Config file locations
|
||||
|
||||
Vikunja will search on various places for a config file:
|
||||
|
||||
* Next to the location of the binary
|
||||
* In the `service.rootpath` location set in a config (remember you can set config arguments via environment variables)
|
||||
* In `/etc/vikunja`
|
||||
* In `~/.config/vikunja`
|
||||
|
||||
# Default configuration with explanations
|
||||
|
||||
This is the same as the `config.yml.sample` file you'll find in the root of vikunja.
|
||||
|
|
|
@ -84,8 +84,9 @@ func init() {
|
|||
viper.AutomaticEnv()
|
||||
|
||||
// Load the config file
|
||||
viper.AddConfigPath(exPath)
|
||||
viper.AddConfigPath(viper.GetString("service.rootpath"))
|
||||
viper.AddConfigPath("/etc/vikunja/")
|
||||
viper.AddConfigPath("~/.config/vikunja")
|
||||
viper.AddConfigPath(".")
|
||||
viper.SetConfigName("config")
|
||||
err = viper.ReadInConfig()
|
||||
|
|
Loading…
Reference in a new issue