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,9 +2,12 @@
|
||||||
upstream {{ $host }} {
|
upstream {{ $host }} {
|
||||||
|
|
||||||
{{ range $index, $value := $containers }}
|
{{ range $index, $value := $containers }}
|
||||||
{{ with $address := index $value.Addresses 0 }}
|
{{ range $address := $value.Addresses }}
|
||||||
|
{{ if eq $address.Port "80" }}
|
||||||
server {{ $value.Gateway }}:{{ $address.HostPort }};
|
server {{ $value.Gateway }}:{{ $address.HostPort }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue