traefik/providerTemplates/docker.tmpl

14 lines
530 B
Cheetah
Raw Normal View History

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