{{$apps := .Applications}} {{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}} {{end}} {{range $apps}} {{ if hasMaxConnLabels . }} [backends."backend{{getBackend . }}".maxconn] amount = {{getMaxConnAmount . }} extractorfunc = "{{getMaxConnExtractorFunc . }}" {{end}} {{ if hasLoadBalancerLabels . }} [backends."backend{{getBackend . }}".loadbalancer] method = "{{getLoadBalancerMethod . }}" sticky = {{getSticky .}} {{end}} {{ if hasCircuitBreakerLabels . }} [backends."backend{{getBackend . }}".circuitbreaker] expression = "{{getCircuitBreakerExpression . }}" {{end}} {{ if hasHealthCheckLabels . }} [backends."backend{{getBackend . }}".healthcheck] path = "{{getHealthCheckPath . }}" interval = "{{getHealthCheckInterval . }}" {{end}} {{end}} [frontends]{{range $apps}} [frontends."frontend{{.ID | replace "/" "-"}}"] backend = "backend{{getBackend .}}" passHostHeader = {{getPassHostHeader .}} priority = {{getPriority .}} entryPoints = [{{range getEntryPoints .}} "{{.}}", {{end}}] basicAuth = [{{range getBasicAuth .}} "{{.}}", {{end}}] [frontends."frontend{{.ID | replace "/" "-"}}".routes."route-host{{.ID | replace "/" "-"}}"] rule = "{{getFrontendRule .}}" {{end}}