Merge e9d693aee5
into 9cdb8047bf
This commit is contained in:
commit
e8832c2deb
1 changed files with 6 additions and 0 deletions
|
@ -180,6 +180,11 @@ upstream {{ $upstream_name }} {
|
|||
# /!\ Virtual port not exposed
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if (eq $container.Env.VIRTUAL_IP "127.0.0.1") }}
|
||||
{{ $server_found = "true" }}
|
||||
## Detected host proxy port forward
|
||||
server {{ $container.Env.VIRTUAL_IP }}:{{ $container.Env.VIRTUAL_PORT }};
|
||||
{{ else }}
|
||||
{{ range $knownNetwork := $CurrentContainer.Networks }}
|
||||
{{ range $containerNetwork := $container.Networks }}
|
||||
{{ if (and (ne $containerNetwork.Name "ingress") (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }}
|
||||
|
@ -211,6 +216,7 @@ upstream {{ $upstream_name }} {
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* nginx-proxy/nginx-proxy#1105 */}}
|
||||
{{ if (eq $server_found "false") }}
|
||||
# Fallback entry
|
||||
|
|
Loading…
Reference in a new issue