Add support for Websocket port
This commit is contained in:
parent
e99b517833
commit
df4cdb5762
1 changed files with 2 additions and 2 deletions
|
@ -129,9 +129,9 @@ upstream ws.{{ $host }} {
|
|||
{{ if eq $addrLen 1 }}
|
||||
{{ $address := index $container.Addresses 0 }}
|
||||
{{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }}
|
||||
{{/* If more than one port exposed, use the one matching VIRTUAL_PORT env var, falling back to standard web port 80 */}}
|
||||
{{/* If more than one port exposed, use the one matching SOCKET_PORT env var, falling back to standard web port 80 */}}
|
||||
{{ else }}
|
||||
{{ $port := coalesce $container.Env.VIRTUAL_PORT "80" }}
|
||||
{{ $port := coalesce $container.Env.SOCKET_PORT "80" }}
|
||||
{{ $address := where $container.Addresses "Port" $port | first }}
|
||||
{{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue