refactor rules -> routes, routes -> frontends

This commit is contained in:
emile 2015-09-15 16:09:21 +02:00
parent 74ae3eaa01
commit a4f542c02f
7 changed files with 62 additions and 62 deletions

View file

@ -4,11 +4,11 @@
weight = {{getWeight .}}
{{end}}
[routes]{{range $host, $containers := .Hosts}}
[routes.route-{{$host}}]
[frontends]{{range $host, $containers := .Hosts}}
[frontends.frontend-{{$host}}]
{{$container := index $containers 0}}
backend = "backend-{{getBackend $container}}"
[routes.route-{{$host}}.rules.rule-host-{{$host}}]
[frontends.frontend-{{$host}}.routes.route-host-{{$host}}]
category = "Host"
value = "{{$host}}.{{$.Domain}}"
{{end}}

View file

@ -10,10 +10,10 @@
{{end}}
{{end}}
[routes]{{range .Applications}}
[routes.route{{.ID | replace "/" "-"}}]
[frontends]{{range .Applications}}
[frontends.frontend{{.ID | replace "/" "-"}}]
backend = "backend{{.ID | replace "/" "-"}}"
[routes.route-{{getHost . | replace "/" "-"}}.rules.rule-host-{{getHost . | replace "/" "-"}}]
[frontends.frontend-{{getHost . | replace "/" "-"}}.routes.route-host-{{getHost . | replace "/" "-"}}]
category = "Host"
value = "{{getHost . | replace "/" "-"}}.{{$.Domain}}"
{{end}}