2015-09-10 14:14:08 +00:00
|
|
|
{{$apps := .Applications}}
|
2015-09-09 20:39:08 +00:00
|
|
|
[backends]{{range .Tasks}}
|
2016-10-11 14:12:23 +00:00
|
|
|
[backends."backend{{getBackend . $apps}}".servers."server-{{.ID | replace "." "-"}}"]
|
2017-01-06 15:26:50 +00:00
|
|
|
url = "{{getProtocol . $apps}}://{{getBackendServer . $apps}}:{{getPort . $apps}}"
|
2015-10-23 07:49:19 +00:00
|
|
|
weight = {{getWeight . $apps}}
|
2015-09-09 20:39:08 +00:00
|
|
|
{{end}}
|
|
|
|
|
2016-08-13 16:55:15 +00:00
|
|
|
{{range .Applications}}
|
|
|
|
{{ if hasMaxConnLabels . }}
|
2016-10-11 14:12:23 +00:00
|
|
|
[backends."backend{{getFrontendBackend . }}".maxconn]
|
2016-08-13 16:55:15 +00:00
|
|
|
amount = {{getMaxConnAmount . }}
|
|
|
|
extractorfunc = "{{getMaxConnExtractorFunc . }}"
|
|
|
|
{{end}}
|
|
|
|
{{ if hasLoadBalancerLabels . }}
|
2016-10-11 14:12:23 +00:00
|
|
|
[backends."backend{{getFrontendBackend . }}".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 . }}
|
2016-10-11 14:12:23 +00:00
|
|
|
[backends."backend{{getFrontendBackend . }}".circuitbreaker]
|
2016-08-13 16:55:15 +00:00
|
|
|
expression = "{{getCircuitBreakerExpression . }}"
|
|
|
|
{{end}}
|
2017-03-15 18:16:06 +00:00
|
|
|
{{ if hasHealthCheckLabels . }}
|
|
|
|
[backends."backend{{getFrontendBackend . }}".healthcheck]
|
|
|
|
path = "{{getHealthCheckPath . }}"
|
|
|
|
interval = "{{getHealthCheckInterval . }}"
|
|
|
|
{{end}}
|
2016-08-13 16:55:15 +00:00
|
|
|
{{end}}
|
|
|
|
|
2015-09-15 14:09:21 +00:00
|
|
|
[frontends]{{range .Applications}}
|
2016-10-11 14:12:23 +00:00
|
|
|
[frontends."frontend{{.ID | replace "/" "-"}}"]
|
2016-02-12 13:45:36 +00:00
|
|
|
backend = "backend{{getFrontendBackend .}}"
|
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}}
|