This commit is contained in:
ccpaging 2021-05-14 21:11:52 +01:00 committed by GitHub
commit 0235f4da81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,6 +180,13 @@ server {
upstream {{ $upstream_name }} {
{{ range $container := $containers }}
{{ $upstreams := or ($container.Env.VIRTUAL_UPSTREAM) "" }}
{{ if ne $upstreams "" }}
# connect to extern VIRTUAL_UPSTREAM
{{ range $upstream := split $upstreams "," }}
server {{ $upstream }};
{{ end }}
{{ else }}
{{ $addrLen := len $container.Addresses }}
{{ range $knownNetwork := $CurrentContainer.Networks }}
@ -204,6 +211,7 @@ upstream {{ $upstream_name }} {
{{ end }}
{{ end }}
{{ end }}
{{ end }}
}
{{ $default_host := or ($.Env.DEFAULT_HOST) "" }}