1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2024-11-24 12:56:30 +00:00

Merge pull request #1106 from hwellmann/master

do not create an empty upstream entry for invisible containers
This commit is contained in:
Jason Wilder 2018-03-23 12:14:37 -06:00 committed by GitHub
commit 6290f38069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 }}