Fix weight visibility / scope

This commit is contained in:
Niklas Keller 2015-10-10 01:19:06 +02:00
parent 5e98c61f65
commit e583285351

View file

@ -74,10 +74,9 @@ server {
upstream {{ $host }} {
{{ range $container := $containers }}
{{ $weight := 1 }}
{{ if $container.Env.VIRTUAL_WEIGHT }}
{{ $weight := $container.Env.VIRTUAL_WEIGHT }}
{{ else }}
{{ $weight := 1 }}
{{end }}
{{ $addrLen := len $container.Addresses }}
{{/* If only 1 port exposed, use that */}}