2016-08-31 20:43:05 +00:00
|
|
|
[backends]{{range .Applications}}
|
|
|
|
{{ $app := .}}
|
|
|
|
{{range .Instances}}
|
|
|
|
[backends.backend{{$app.Name}}.servers.server-{{ getInstanceID . }}]
|
|
|
|
url = "{{ getProtocol . }}://{{ .IpAddr }}:{{ getPort . }}"
|
|
|
|
weight = {{ getWeight . }}
|
|
|
|
{{end}}{{end}}
|
|
|
|
|
|
|
|
[frontends]{{range .Applications}}
|
|
|
|
[frontends.frontend{{.Name}}]
|
|
|
|
backend = "backend{{.Name}}"
|
|
|
|
entryPoints = ["http"]
|
|
|
|
[frontends.frontend{{.Name }}.routes.route-host{{.Name}}]
|
2016-11-20 17:24:15 +00:00
|
|
|
rule = "Host:{{ .Name | tolower }}"
|
2016-08-31 20:43:05 +00:00
|
|
|
{{end}}
|