traefik/templates/eureka.tmpl

25 lines
633 B
Cheetah
Raw Normal View History

2018-02-13 08:20:04 +00:00
[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 }}"
2016-08-31 20:43:05 +00:00
entryPoints = ["http"]
2018-02-13 08:20:04 +00:00
[frontends.frontend-{{ $app.Name }}.routes.route-host{{ $app.Name }}]
rule = "Host:{{ $app.Name | tolower }}"
2016-08-31 20:43:05 +00:00
{{end}}