traefik/templates/consul_catalog.tmpl

13 lines
452 B
Cheetah
Raw Normal View History

2016-02-02 17:03:40 +00:00
[backends]{{range .Nodes}}
[backends.backend-{{getBackend .}}.servers.{{.Service.Service | replace "." "-"}}--{{.Service.Address | replace "." "-"}}--{{.Service.Port}}]
url = "http://{{.Service.Address}}:{{.Service.Port}}"
2016-02-02 17:03:40 +00:00
{{end}}
[frontends]{{range .Services}}
[frontends.frontend-{{.}}]
backend = "backend-{{.}}"
passHostHeader = false
[frontends.frontend-{{.}}.routes.route-host-{{.}}]
rule = "{{getFrontendValue .}}"
2016-02-02 17:03:40 +00:00
{{end}}