2015-09-10 14:14:08 +00:00
|
|
|
{{$apps := .Applications}}
|
2017-05-22 21:21:15 +00:00
|
|
|
|
|
|
|
{{range $app := $apps}}
|
|
|
|
{{range $app.Tasks}}
|
|
|
|
[backends."backend{{getBackend $app}}".servers."server-{{.ID | replace "." "-"}}"]
|
|
|
|
url = "{{getProtocol $app}}://{{getBackendServer . $app}}:{{getPort . $app}}"
|
|
|
|
weight = {{getWeight $app}}
|
|
|
|
{{end}}
|
2015-09-09 20:39:08 +00:00
|
|
|
{{end}}
|
|
|
|
|
2017-05-22 21:21:15 +00:00
|
|
|
{{range $apps}}
|
2016-08-13 16:55:15 +00:00
|
|
|
{{ if hasMaxConnLabels . }}
|
2017-05-22 21:21:15 +00:00
|
|
|
[backends."backend{{getBackend . }}".maxconn]
|
2016-08-13 16:55:15 +00:00
|
|
|
amount = {{getMaxConnAmount . }}
|
|
|
|
extractorfunc = "{{getMaxConnExtractorFunc . }}"
|
|
|
|
{{end}}
|
|
|
|
{{ if hasLoadBalancerLabels . }}
|
2017-05-22 21:21:15 +00:00
|
|
|
[backends."backend{{getBackend . }}".loadbalancer]
|
2016-08-13 16:55:15 +00:00
|
|
|
method = "{{getLoadBalancerMethod . }}"
|
2016-05-13 14:22:11 +00:00
|
|
|
sticky = {{getSticky .}}
|
2016-08-13 16:55:15 +00:00
|
|
|
{{end}}
|
|
|
|
{{ if hasCircuitBreakerLabels . }}
|
2017-05-22 21:21:15 +00:00
|
|
|
[backends."backend{{getBackend . }}".circuitbreaker]
|
2016-08-13 16:55:15 +00:00
|
|
|
expression = "{{getCircuitBreakerExpression . }}"
|
|
|
|
{{end}}
|
2017-03-15 18:16:06 +00:00
|
|
|
{{ if hasHealthCheckLabels . }}
|
2017-05-22 21:21:15 +00:00
|
|
|
[backends."backend{{getBackend . }}".healthcheck]
|
2017-03-15 18:16:06 +00:00
|
|
|
path = "{{getHealthCheckPath . }}"
|
|
|
|
interval = "{{getHealthCheckInterval . }}"
|
|
|
|
{{end}}
|
2016-08-13 16:55:15 +00:00
|
|
|
{{end}}
|
|
|
|
|
2017-05-22 21:21:15 +00:00
|
|
|
[frontends]{{range $apps}}
|
2016-10-11 14:12:23 +00:00
|
|
|
[frontends."frontend{{.ID | replace "/" "-"}}"]
|
2017-05-22 21:21:15 +00:00
|
|
|
backend = "backend{{getBackend .}}"
|
2015-10-30 10:33:41 +00:00
|
|
|
passHostHeader = {{getPassHostHeader .}}
|
2016-06-06 20:30:23 +00:00
|
|
|
priority = {{getPriority .}}
|
2016-02-01 15:08:58 +00:00
|
|
|
entryPoints = [{{range getEntryPoints .}}
|
|
|
|
"{{.}}",
|
2017-06-28 00:22:17 +00:00
|
|
|
{{end}}]
|
|
|
|
basicAuth = [{{range getBasicAuth .}}
|
|
|
|
"{{.}}",
|
2016-02-01 15:08:58 +00:00
|
|
|
{{end}}]
|
2016-10-11 14:12:23 +00:00
|
|
|
[frontends."frontend{{.ID | replace "/" "-"}}".routes."route-host{{.ID | replace "/" "-"}}"]
|
2015-10-23 07:49:19 +00:00
|
|
|
rule = "{{getFrontendRule .}}"
|
2015-12-05 18:59:01 +00:00
|
|
|
{{end}}
|