From c51ea97234f25fd2ac70edd9de30416445f194d9 Mon Sep 17 00:00:00 2001 From: Brian Bland Date: Mon, 15 Dec 2014 14:17:51 -0800 Subject: [PATCH] Allows HTTP bind address to be overridden by an environment variable Uses REGISTRY_HTTP_ADDR --- configuration/configuration.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configuration/configuration.go b/configuration/configuration.go index ab962a90..43405279 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -311,6 +311,10 @@ func parseV0_1Registry(in []byte) (*Configuration, error) { config.Reporting.NewRelic.Name = newRelicName } + if httpAddr, ok := envMap["REGISTRY_HTTP_ADDR"]; ok { + config.HTTP.Addr = httpAddr + } + return (*Configuration)(&config), nil }