这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/networking/proxies/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ Unsetting this value is the same as enabling custom nginx config usage.
{{ .PROXY_PORT }} Non-SSL nginx listener port (same as `DOKKU_PROXY_PORT` config var)
{{ .PROXY_SSL_PORT }} SSL nginx listener port (same as `DOKKU_PROXY_SSL_PORT` config var)
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
{{ .PROXY_PORT_MAP }} List of port mappings (same as the `port-map` ports property)
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from the `port-map` ports property)
{{ .PROXY_PORT_MAP }} List of port mappings (same as the `map` ports property)
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from the `map` ports property)
{{ .RAW_TCP_PORTS }} List of exposed tcp ports as defined by Dockerfile `EXPOSE` directive (**Dockerfile apps only**)
{{ .SSL_INUSE }} Boolean set when an app is SSL-enabled
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
Expand Down
8 changes: 4 additions & 4 deletions plugins/ports/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func addPortMaps(appName string, portMaps []PortMap) error {
}

func clearPorts(appName string) error {
return common.PropertyDelete("ports", appName, "port-map")
return common.PropertyDelete("ports", appName, "map")
}

func doesCertExist(appName string) bool {
Expand Down Expand Up @@ -115,7 +115,7 @@ func getGlobalProxySSLPort() int {
}

func getPortMaps(appName string) []PortMap {
value, err := common.PropertyListGet("ports", appName, "port-map")
value, err := common.PropertyListGet("ports", appName, "map")
if err != nil {
return []PortMap{}
}
Expand Down Expand Up @@ -364,7 +364,7 @@ func removePortMaps(appName string, portMaps []PortMap) error {
}

if len(toSet) == 0 {
return common.PropertyDelete("ports", appName, "port-map")
return common.PropertyDelete("ports", appName, "map")
}

return setPortMaps(appName, toSet)
Expand All @@ -381,7 +381,7 @@ func setPortMaps(appName string, portMaps []PortMap) error {
}

sort.Strings(value)
return common.PropertyListWrite("ports", appName, "port-map", value)
return common.PropertyListWrite("ports", appName, "map", value)
}

func setProxyPort(appName string, port int) error {
Expand Down
6 changes: 3 additions & 3 deletions plugins/ports/triggers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ func TriggerInstall() error {
}

for _, appName := range apps {
if common.PropertyExists("ports", appName, "port-map") {
if common.PropertyExists("ports", appName, "map") {
continue
}

common.LogInfo1(fmt.Sprintf("Migrating DOKKU_PROXY_PORT_MAP to port-map property for %s", appName))
common.LogInfo1(fmt.Sprintf("Migrating DOKKU_PROXY_PORT_MAP to ports map property for %s", appName))
portMapString := config.GetWithDefault(appName, "DOKKU_PROXY_PORT_MAP", "")
portMaps, _ := parsePortMapString(portMapString)

Expand All @@ -32,7 +32,7 @@ func TriggerInstall() error {
propertyValue = append(propertyValue, portMap.String())
}

if err := common.PropertyListWrite("ports", appName, "port-map", propertyValue); err != nil {
if err := common.PropertyListWrite("ports", appName, "map", propertyValue); err != nil {
return err
}

Expand Down