1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-25 23:21:40 +03:00
traefik/templates/ecs.tmpl

31 lines
1.1 KiB
Cheetah
Raw Normal View History

2017-08-25 12:42:03 +03:00
[backends]{{range $serviceName, $instances := .Services}}
[backends.backend-{{ $serviceName }}.loadbalancer]
method = "{{ getLoadBalancerMethod $instances}}"
2017-10-10 12:10:02 +03:00
{{if hasStickinessLabel $instances}}
[Backends.backend-{{ $serviceName }}.LoadBalancer.Stickiness]
2017-10-12 18:50:03 +03:00
cookieName = "{{getStickinessCookieName $instances}}"
2017-10-10 12:10:02 +03:00
{{end}}
2017-01-05 17:24:17 +03:00
2017-08-25 12:42:03 +03:00
{{range $index, $i := $instances}}
[backends.backend-{{ $i.Name }}.servers.server-{{ $i.Name }}{{ $i.ID }}]
url = "{{ $i.Protocol }}://{{ $i.Host }}:{{ $i.Port }}"
weight = {{ $i.Weight }}
{{end}}
2017-01-05 17:24:17 +03:00
{{end}}
2017-08-25 12:42:03 +03:00
[frontends]{{range $serviceName, $instances := .Services}}
{{range filterFrontends $instances}}
[frontends.frontend-{{ $serviceName }}]
backend = "backend-{{ $serviceName }}"
passHostHeader = {{ .PassHostHeader }}
priority = {{ .Priority }}
entryPoints = [{{range .EntryPoints }}
"{{.}}",
2017-09-07 18:34:03 +03:00
{{end}}]
basicAuth = [{{range getBasicAuth .}}
"{{.}}",
2017-08-25 12:42:03 +03:00
{{end}}]
[frontends.frontend-{{ $serviceName }}.routes.route-frontend-{{ $serviceName }}]
rule = "{{getFrontendRule .}}"
{{end}}
{{end}}