Prevent error no servers are inside upstream

This commit is contained in:
SilverFire - Dmitry Naumenko 2017-05-03 12:05:14 +02:00
parent b6a445b1a9
commit 860c7b533b

View file

@ -109,7 +109,7 @@ upstream {{ $upstream_name }} {
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if eq $knownNetwork.Name $containerNetwork.Name }}
## Can be connect with "{{ $containerNetwork.Name }}" network
## Can be connected with "{{ $containerNetwork.Name }}" network
{{/* If only 1 port exposed, use that */}}
{{ if eq $addrLen 1 }}
@ -123,6 +123,7 @@ upstream {{ $upstream_name }} {
{{ end }}
{{ end }}
{{ end }}
server localhost down;
{{ end }}
{{ end }}
}