2015-09-02 19:13:25 +00:00
|
|
|
[backends]{{range .Containers}}
|
2015-09-10 13:12:28 +00:00
|
|
|
[backends.backend-{{getBackend .}}.servers.server-{{.Name | replace "/" "" | replace "." "-"}}]
|
2015-09-09 14:49:51 +00:00
|
|
|
url = "http://{{.NetworkSettings.IPAddress}}:{{getPort .}}"
|
2015-09-10 14:14:08 +00:00
|
|
|
weight = {{getWeight .}}
|
2015-09-02 19:13:25 +00:00
|
|
|
{{end}}
|
|
|
|
|
2015-09-15 14:09:21 +00:00
|
|
|
[frontends]{{range $host, $containers := .Hosts}}
|
|
|
|
[frontends.frontend-{{$host}}]
|
2015-09-09 15:41:33 +00:00
|
|
|
{{$container := index $containers 0}}
|
|
|
|
backend = "backend-{{getBackend $container}}"
|
2015-09-15 14:09:21 +00:00
|
|
|
[frontends.frontend-{{$host}}.routes.route-host-{{$host}}]
|
2015-09-15 16:35:32 +00:00
|
|
|
rule = "Host"
|
2015-09-09 15:10:43 +00:00
|
|
|
value = "{{$host}}.{{$.Domain}}"
|
2015-09-09 14:49:51 +00:00
|
|
|
{{end}}
|