go-bindata static files and templates
This commit is contained in:
parent
79e5ec435a
commit
4a83136970
6 changed files with 32 additions and 9 deletions
19
providerTemplates/marathon.tmpl
Normal file
19
providerTemplates/marathon.tmpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
{{$apps := .Applications}}
|
||||
[backends]{{range .Tasks}}
|
||||
[backends.backend{{.AppID | replace "/" "-"}}.servers.server-{{.ID | replace "." "-"}}]
|
||||
url = "http://{{.Host}}:{{getPort .}}"
|
||||
{{$appID := .AppID}}
|
||||
{{range $apps}}
|
||||
{{if eq $appID .ID}}
|
||||
weight = {{getWeight .}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
[routes]{{range .Applications}}
|
||||
[routes.route{{.ID | replace "/" "-"}}]
|
||||
backend = "backend{{.ID | replace "/" "-"}}"
|
||||
[routes.route-{{getHost . | replace "/" "-"}}.rules.rule-host-{{getHost . | replace "/" "-"}}]
|
||||
category = "Host"
|
||||
value = "{{getHost . | replace "/" "-"}}.{{$.Domain}}"
|
||||
{{end}}
|
Loading…
Add table
Add a link
Reference in a new issue