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

37 lines
1.4 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}}"
sticky = {{ getSticky $instances}}
2017-10-10 12:10:02 +03:00
{{if hasStickinessLabel $instances}}
2017-10-16 18:38:03 +03:00
[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-11-21 13:06:03 +03:00
{{ if hasHealthCheckLabels $instances }}
[backends.backend-{{ $serviceName }}.healthcheck]
path = "{{getHealthCheckPath $instances }}"
interval = "{{getHealthCheckInterval $instances }}"
{{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 }}]
2017-09-06 13:10:05 +03:00
url = "{{ getProtocol $i }}://{{ getHost $i }}:{{ getPort $i }}"
weight = {{ getWeight $i}}
2017-08-25 12:42:03 +03:00
{{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 }}"
2017-09-06 13:10:05 +03:00
passHostHeader = {{ getPassHostHeader .}}
priority = {{ getPriority .}}
entryPoints = [{{range getEntryPoints .}}
2017-08-25 12:42:03 +03:00
"{{.}}",
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}}