Fix for proxy to route only to containers with 80 port exposed
This commit is contained in:
parent
92be4fa1ca
commit
f22f5ea377
1 changed files with 4 additions and 1 deletions
|
@ -2,11 +2,14 @@
|
|||
upstream {{ $host }} {
|
||||
|
||||
{{ range $index, $value := $containers }}
|
||||
{{ with $address := index $value.Addresses 0 }}
|
||||
{{ range $address := $value.Addresses }}
|
||||
{{ if eq $address.Port "80" }}
|
||||
server {{ $value.Gateway }}:{{ $address.HostPort }};
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
|
|
Loading…
Reference in a new issue