mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 01:38:15 +00:00
chore: Rename $container
to $containers
The value is actually a slice/array of containers so it should be pluralized.
This commit is contained in:
parent
05423c681a
commit
14d0f3f222
16
nginx.tmpl
16
nginx.tmpl
@ -397,15 +397,15 @@ server {
|
||||
{{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }}
|
||||
{{ template "location" (dict "Path" "/" "Proto" $proto "Upstream" $upstream_name "Host" $host "VhostRoot" $vhost_root "Dest" "" "NetworkTag" $network_tag) }}
|
||||
{{ else }}
|
||||
{{ range $path, $container := $paths }}
|
||||
{{ range $path, $containers := $paths }}
|
||||
{{/* Get the VIRTUAL_PROTO defined by containers w/ the same vhost-vpath, falling back to "http" */}}
|
||||
{{ $proto := trim (or (first (groupByKeys $container "Env.VIRTUAL_PROTO")) "http") }}
|
||||
{{ $proto := trim (or (first (groupByKeys $containers "Env.VIRTUAL_PROTO")) "http") }}
|
||||
|
||||
{{/* Get the NETWORK_ACCESS defined by containers w/ the same vhost, falling back to "external" */}}
|
||||
{{ $network_tag := or (first (groupByKeys $container "Env.NETWORK_ACCESS")) "external" }}
|
||||
{{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }}
|
||||
{{ $sum := sha1 $path }}
|
||||
{{ $upstream := printf "%s-%s" $upstream_name $sum }}
|
||||
{{ $dest := (or (first (groupByKeys $container "Env.VIRTUAL_DEST")) "") }}
|
||||
{{ $dest := (or (first (groupByKeys $containers "Env.VIRTUAL_DEST")) "") }}
|
||||
{{ template "location" (dict "Path" $path "Proto" $proto "Upstream" $upstream "Host" $host "VhostRoot" $vhost_root "Dest" $dest "NetworkTag" $network_tag) }}
|
||||
{{ end }}
|
||||
{{ if (not (contains $paths "/")) }}
|
||||
@ -445,15 +445,15 @@ server {
|
||||
{{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }}
|
||||
{{ template "location" (dict "Path" "/" "Proto" $proto "Upstream" $upstream_name "Host" $host "VhostRoot" $vhost_root "Dest" "" "NetworkTag" $network_tag) }}
|
||||
{{ else }}
|
||||
{{ range $path, $container := $paths }}
|
||||
{{ range $path, $containers := $paths }}
|
||||
{{/* Get the VIRTUAL_PROTO defined by containers w/ the same vhost-vpath, falling back to "http" */}}
|
||||
{{ $proto := trim (or (first (groupByKeys $container "Env.VIRTUAL_PROTO")) "http") }}
|
||||
{{ $proto := trim (or (first (groupByKeys $containers "Env.VIRTUAL_PROTO")) "http") }}
|
||||
|
||||
{{/* Get the NETWORK_ACCESS defined by containers w/ the same vhost, falling back to "external" */}}
|
||||
{{ $network_tag := or (first (groupByKeys $container "Env.NETWORK_ACCESS")) "external" }}
|
||||
{{ $network_tag := or (first (groupByKeys $containers "Env.NETWORK_ACCESS")) "external" }}
|
||||
{{ $sum := sha1 $path }}
|
||||
{{ $upstream := printf "%s-%s" $upstream_name $sum }}
|
||||
{{ $dest := (or (first (groupByKeys $container "Env.VIRTUAL_DEST")) "") }}
|
||||
{{ $dest := (or (first (groupByKeys $containers "Env.VIRTUAL_DEST")) "") }}
|
||||
{{ template "location" (dict "Path" $path "Proto" $proto "Upstream" $upstream "Host" $host "VhostRoot" $vhost_root "Dest" $dest "NetworkTag" $network_tag) }}
|
||||
{{ end }}
|
||||
{{ if (not (contains $paths "/")) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user