updated config
parent
8ce51dcbbd
commit
ac42d1989d
|
@ -50,11 +50,9 @@ func LoadConfig() {
|
|||
fmt.Println("Load env from system")
|
||||
}
|
||||
|
||||
Cfg = Config{
|
||||
config := Config{
|
||||
Debug: os.Getenv("DEBUG") == "true",
|
||||
ColorizedOutput: os.Getenv("COLORIZED_OUTPUT") == "true",
|
||||
Host: os.Getenv("HOST"),
|
||||
Port: os.Getenv("PORT"),
|
||||
LogManagerServerUrl: os.Getenv("LOG_MANAGER_SERVER_URL"),
|
||||
TelegramBotManagerEnabled: os.Getenv("TELEGRAM_BOT_MANAGER_ENABLED") == "true",
|
||||
TelegramBotManagerServerUrl: os.Getenv("TELEGRAM_BOT_MANAGER_SERVER_URL"),
|
||||
|
@ -75,4 +73,15 @@ func LoadConfig() {
|
|||
Token: os.Getenv("INVEX_API_TOKEN"),
|
||||
},
|
||||
}
|
||||
|
||||
// load default values if not in docker
|
||||
if os.Getenv("DOCKER") == "" {
|
||||
config.Host = os.Getenv("HOST")
|
||||
config.Port = os.Getenv("PORT")
|
||||
} else { // load from docker env
|
||||
config.Host = "0.0.0.0"
|
||||
config.Port = "3000"
|
||||
}
|
||||
|
||||
Cfg = config
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue