traefik/templates/eureka.tmpl

25 lines
643 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 }}
2018-03-07 21:10:04 +00:00
[backends."backend-{{ $app.Name }}".servers."server-{{ getInstanceID $instance }}"]
2018-02-13 08:20:04 +00:00
url = "{{ getProtocol $instance }}://{{ .IpAddr }}:{{ getPort $instance }}"
weight = {{ getWeight $instance }}
{{end}}
{{end}}
[frontends]
{{range $app := .Applications }}
2018-03-07 21:10:04 +00:00
[frontends."frontend-{{ $app.Name }}"]
2018-02-13 08:20:04 +00:00
backend = "backend-{{ $app.Name }}"
2016-08-31 20:43:05 +00:00
entryPoints = ["http"]
2018-02-13 08:20:04 +00:00
2018-03-07 21:10:04 +00:00
[frontends."frontend-{{ $app.Name }}".routes."route-host{{ $app.Name }}"]
2018-02-13 08:20:04 +00:00
rule = "Host:{{ $app.Name | tolower }}"
2016-08-31 20:43:05 +00:00
{{end}}