Fix for proxy to route only to containers with 80 port exposed
This commit is contained in:
parent
92be4fa1ca
commit
f22f5ea377
@ -2,11 +2,14 @@
|
|||||||
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 }}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user