diff --git a/nginx.tmpl b/nginx.tmpl index c48c652..bc0a69f 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -91,12 +91,12 @@ upstream {{ $host }} { {{/* If only 1 port exposed, use that */}} {{ if eq $addrLen 1 }} {{ $address := index $container.Addresses 0 }} - {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork "Weight" $weight) }} + {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork "Weight" $weight) }} {{/* If more than one port exposed, use the one matching VIRTUAL_PORT env var, falling back to standard web port 80 */}} {{ else }} {{ $port := coalesce $container.Env.VIRTUAL_PORT "80" }} {{ $address := where $container.Addresses "Port" $port | first }} - {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork "Weight" $weight) }} + {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork "Weight" $weight) }} {{ end }} {{ end }} {{ end }}