diff --git a/conf/config.yml b/conf/config.yml index 441f5a6..5666266 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -9,16 +9,16 @@ database: moduleName: "config" grpcOuterAddress: - ip: 127.0.0.1 + #ip: 127.0.0.1 port: 9002 ws: rest: port: "9001" - ip: "127.0.0.1" + ip: "0.0.0.0" grpc: port: "9002" - ip: "127.0.0.1" + ip: "0.0.0.0" metrics: gc: true diff --git a/main.go b/main.go index 43c2c6d..ac3fc31 100644 --- a/main.go +++ b/main.go @@ -59,12 +59,14 @@ func main() { cfg := config.Get().(*conf.Configuration) handlers := helper.GetHandlers() endpoints := backend.GetEndpoints(cfg.ModuleName, handlers) - address := cfg.WS.Grpc - ip, err := getOutboundIp() - if err != nil { - panic(err) + address := cfg.GrpcOuterAddress + if address.IP == "" { + ip, err := getOutboundIp() + if err != nil { + panic(err) + } + address.IP = ip } - address.IP = ip declaration := structure.BackendDeclaration{ ModuleName: cfg.ModuleName, Version: version,