mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2024-05-28 10:26:13 +02:00
Merge pull request #1106 from hwellmann/master
do not create an empty upstream entry for invisible containers
This commit is contained in:
commit
6290f38069
|
@ -142,6 +142,9 @@ upstream {{ $upstream_name }} {
|
|||
{{ $address := where $container.Addresses "Port" $port | first }}
|
||||
{{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
# Cannot connect to network of this container
|
||||
server 127.0.0.1 down;
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue