1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2024-12-26 04:26:31 +00:00

do not create an empty upstream entry for a container from an invisible Docker network

This commit is contained in:
Harald Wellmann 2018-03-22 10:56:41 +01:00
parent 000a44772d
commit b61c841929

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