traefik/marathon.tmpl

19 lines
629 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}}
[routes]{{range .Applications}}
[routes.route{{.ID | replace "/" "-"}}]
2015-09-09 21:09:16 +00:00
backend = "backend{{.ID | replace "/" "-"}}"
2015-09-09 21:12:55 +00:00
[routes.route-{{getHost . | replace "/" "-"}}.rules.rule-host-{{getHost . | replace "/" "-"}}]
2015-09-09 20:39:08 +00:00
category = "Host"
2015-09-09 21:12:55 +00:00
value = "{{getHost . | replace "/" "-"}}.{{$.Domain}}"
2015-09-09 20:39:08 +00:00
{{end}}