Add the possibility to define the VIRTUAL_HOST_VARNAME in order to be able to create multiple nginx-proxy instances.
This commit is contained in:
parent
b0c6c9f67e
commit
1030f773f9
1 changed files with 4 additions and 1 deletions
|
@ -168,7 +168,10 @@ server {
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }}
|
{{/* Get the VIRTUAL_HOST_VARNAME for filtering */}}
|
||||||
|
{{ $virtual_host_varname := (or ($.Env.VIRTUAL_HOST_VARNAME) "VIRTUAL_HOST") }}
|
||||||
|
|
||||||
|
{{ range $host, $containers := groupByMulti $ (print "Env." $virtual_host_varname) "," }}
|
||||||
|
|
||||||
{{ $host := trim $host }}
|
{{ $host := trim $host }}
|
||||||
{{ $is_regexp := hasPrefix "~" $host }}
|
{{ $is_regexp := hasPrefix "~" $host }}
|
||||||
|
|
Loading…
Reference in a new issue