mirror of
https://github.com/containous/traefik.git
synced 2024-12-28 07:21:39 +03:00
25 lines
633 B
Cheetah
25 lines
633 B
Cheetah
[backends]
|
|
{{range $app := .Applications }}
|
|
|
|
[backends.backend-{{ $app.Name }}]
|
|
|
|
{{range $instance := .Instances }}
|
|
[backends.backend-{{ $app.Name }}.servers.server-{{ getInstanceID $instance }}]
|
|
url = "{{ getProtocol $instance }}://{{ .IpAddr }}:{{ getPort $instance }}"
|
|
weight = {{ getWeight $instance }}
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
[frontends]
|
|
{{range $app := .Applications }}
|
|
|
|
[frontends.frontend-{{ $app.Name }}]
|
|
backend = "backend-{{ $app.Name }}"
|
|
entryPoints = ["http"]
|
|
|
|
[frontends.frontend-{{ $app.Name }}.routes.route-host{{ $app.Name }}]
|
|
rule = "Host:{{ $app.Name | tolower }}"
|
|
|
|
{{end}}
|