From 3f85b682fb5fbb6ed74d5fe4cd2b180e5ec605a6 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 25 Feb 2020 21:14:37 -0500 Subject: [PATCH] fix: ensure proxy ports are sorted --- plugins/proxy/proxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/proxy/proxy.go b/plugins/proxy/proxy.go index 8e08d8255..63cad5784 100644 --- a/plugins/proxy/proxy.go +++ b/plugins/proxy/proxy.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "os" + "sort" "strconv" "strings" @@ -120,6 +121,7 @@ func listAppProxyPorts(appName string) error { lines = append(lines, portMap.String()) } + sort.Strings(lines) common.LogInfo1Quiet(fmt.Sprintf("Port mappings for %s", appName)) config := columnize.DefaultConfig() config.Delim = ":" @@ -135,6 +137,7 @@ func setProxyPorts(appName string, proxyPortMap []PortMap) error { value = append(value, portMap.String()) } + sort.Strings(value) entries := map[string]string{ "DOKKU_PROXY_PORT_MAP": strings.Join(value, " "), }