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