traefik/templates/mesos.tmpl

30 lines
821 B
Cheetah
Raw Normal View History

2018-01-10 02:19:22 +00:00
{{ $apps := .Applications }}
[backends]
{{range $task := .Tasks }}
{{ $backendName := getBackend $task $apps }}
[backends.backend-{{ $backendName }}.servers.server-{{ getID $task }}]
url = "{{ getProtocol $task $apps }}://{{ getHost $task }}:{{ getPort $task $apps }}"
weight = {{ getWeight $task $apps }}
{{end}}
2018-01-10 02:19:22 +00:00
[frontends]
{{range $app := $apps }}
{{ $frontendName := getFrontEndName $app }}
[frontends.frontend-{{ $frontendName }}]
backend = "backend-{{ getFrontendBackend $app }}"
priority = {{ getPriority $app }}
passHostHeader = {{ getPassHostHeader $app }}
entryPoints = [{{range getEntryPoints $app }}
"{{.}}",
{{end}}]
[frontends.frontend-{{ $frontendName }}.routes.route-host-{{ $frontendName }}]
rule = "{{ getFrontendRule $app }}"
{{end}}