traefik/templates/marathon.tmpl

16 lines
613 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{{with index $apps 0 }}{{getBackend .}}{{end}}.servers.server-{{.ID | replace "." "-"}}]
url = "{{getProtocol . $apps}}://{{.Host}}:{{getPort . $apps}}"
weight = {{getWeight . $apps}}
2015-09-09 20:39:08 +00:00
{{end}}
[frontends]{{range .Applications}}
[frontends.frontend{{.ID | replace "/" "-"}}]
backend = "backend{{getBackend .}}"
passHostHeader = {{getPassHostHeader .}}
[frontends.frontend{{.ID | replace "/" "-"}}.routes.route-host{{.ID | replace "/" "-"}}]
rule = "{{getFrontendRule .}}"
value = "{{getFrontendValue .}}"
{{end}}