From df4cdb5762c62f7e62fa2bcd181f8b97c1db5dcd Mon Sep 17 00:00:00 2001 From: Thiago Trennepohl Date: Tue, 8 Nov 2016 17:19:30 -0200 Subject: [PATCH] Add support for Websocket port --- nginx.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.tmpl b/nginx.tmpl index 01c5afd..a1707e3 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -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 }}