traefik/providerTemplates/marathon.tmpl

19 lines
642 B
Cheetah
Raw Normal View History

2015-09-10 14:14:08 +00:00
{{$apps := .Applications}}
2015-09-09 20:39:08 +00:00
[backends]{{range .Tasks}}
[backends.backend{{.AppID | replace "/" "-"}}.servers.server-{{.ID | replace "." "-"}}]
url = "http://{{.Host}}:{{getPort .}}"
2015-09-10 14:14:08 +00:00
{{$appID := .AppID}}
{{range $apps}}
{{if eq $appID .ID}}
weight = {{getWeight .}}
{{end}}
{{end}}
2015-09-09 20:39:08 +00:00
{{end}}
[frontends]{{range .Applications}}
[frontends.frontend{{.ID | replace "/" "-"}}]
2015-09-09 21:09:16 +00:00
backend = "backend{{.ID | replace "/" "-"}}"
[frontends.frontend-{{getHost . | replace "/" "-"}}.routes.route-host-{{getHost . | replace "/" "-"}}]
2015-09-15 16:35:32 +00:00
rule = "Host"
2015-09-09 21:12:55 +00:00
value = "{{getHost . | replace "/" "-"}}.{{$.Domain}}"
2015-09-09 20:39:08 +00:00
{{end}}