Skip to content
Snippets Groups Projects
Unverified Commit e3d1fb5c authored by Xin.Zh's avatar Xin.Zh Committed by GitHub
Browse files

Merge pull request #1036 from LaurenceLiZhixin/Ftr/registryIp

Ftr: registry ip:port set from enviroment variable
parents 8dcef264 93d25b50
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,13 @@ func (r *BaseRegistry) Register(conf *common.URL) error {
ok bool
err error
)
// if developer define registry port and ip, use it first.
if ipToRegistry := os.Getenv("DUBBO_IP_TO_REGISTRY"); ipToRegistry != "" {
conf.Ip = ipToRegistry
}
if portToRegistry := os.Getenv("DUBBO_PORT_TO_REGISTRY"); portToRegistry != "" {
conf.Port = portToRegistry
}
role, _ := strconv.Atoi(r.URL.GetParam(constant.ROLE_KEY, ""))
// Check if the service has been registered
r.cltLock.Lock()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment