diff --git a/notification-server/server.go b/notification-server/server.go index 7b6dfea..c6af3f8 100644 --- a/notification-server/server.go +++ b/notification-server/server.go @@ -11,6 +11,7 @@ import ( "os/signal" "path/filepath" "strings" + "strconv" "syscall" "time" @@ -45,8 +46,18 @@ func init() { } func loadNotifConfig() { - host = "0.0.0.0" + host := os.Getenv("NOTIFICATION_SERVER_HOST") + if host == "" { + host = "0.0.0.0" + } + port = 8083 + if os.Getenv("NOTIFICATION_SERVER_PORT") != "" { + i, err := strconv.Atoi(os.Getenv("NOTIFICATION_SERVER_PORT")) + if err == nil { + port = i + } + } logLevel := os.Getenv("NOTIFICATION_SERVER_LOG_LEVEL") if logLevel == "" {