This commit is contained in:
Ondřej Perutka 2023-01-16 00:12:41 +01:00 committed by GitHub
commit 33b5273ee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,6 +126,10 @@ upstream {{ .Upstream }} {
{{ if $containerNetwork.IP }}
{{ $server_found = "true" }}
server {{ $containerNetwork.IP }}:{{ $port }};
{{/* The container is in the host network and wants to be exposed */}}
{{ else if (and $container.Env.VIRTUAL_PORT (eq $containerNetwork.Name "host")) }}
{{ $server_found = "true" }}
server 127.0.0.1:{{ $port }};
{{ else }}
# /!\ No IP for this network!
{{ end }}