fix: ensure proxy ports are sorted
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -120,6 +121,7 @@ func listAppProxyPorts(appName string) error {
|
|||||||
lines = append(lines, portMap.String())
|
lines = append(lines, portMap.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Strings(lines)
|
||||||
common.LogInfo1Quiet(fmt.Sprintf("Port mappings for %s", appName))
|
common.LogInfo1Quiet(fmt.Sprintf("Port mappings for %s", appName))
|
||||||
config := columnize.DefaultConfig()
|
config := columnize.DefaultConfig()
|
||||||
config.Delim = ":"
|
config.Delim = ":"
|
||||||
@@ -135,6 +137,7 @@ func setProxyPorts(appName string, proxyPortMap []PortMap) error {
|
|||||||
value = append(value, portMap.String())
|
value = append(value, portMap.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Strings(value)
|
||||||
entries := map[string]string{
|
entries := map[string]string{
|
||||||
"DOKKU_PROXY_PORT_MAP": strings.Join(value, " "),
|
"DOKKU_PROXY_PORT_MAP": strings.Join(value, " "),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user