Merge pull request #227 from ziprandom/read_config_settings_from_env
server: additionally read config settings from env
This commit is contained in:
commit
5e292ad77b
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,8 @@ func ReadConfigFile() (*Configuration, error) {
|
|||
viper.SetConfigName("config") // name of config file (without extension)
|
||||
viper.SetConfigType("json") // REQUIRED if the config file does not have the extension in the name
|
||||
viper.AddConfigPath(".") // optionally look for config in the working directory
|
||||
viper.SetEnvPrefix("focalboard")
|
||||
viper.AutomaticEnv() // read config values from env like FOCALBOARD_SERVERROOT=...
|
||||
viper.SetDefault("ServerRoot", DefaultServerRoot)
|
||||
viper.SetDefault("Port", DefaultPort)
|
||||
viper.SetDefault("DBType", "sqlite3")
|
||||
|
|
Loading…
Reference in a new issue