traefik/providerTemplates/docker.tmpl
2015-09-11 18:47:54 +02:00

14 lines
No EOL
517 B
Cheetah

[backends]{{range .Containers}}
[backends.backend-{{getBackend .}}.servers.server-{{.Name | replace "/" "" | replace "." "-"}}]
url = "http://{{.NetworkSettings.IPAddress}}:{{getPort .}}"
weight = {{getWeight .}}
{{end}}
[routes]{{range $host, $containers := .Hosts}}
[routes.route-{{$host}}]
{{$container := index $containers 0}}
backend = "backend-{{getBackend $container}}"
[routes.route-{{$host}}.rules.rule-host-{{$host}}]
category = "Host"
value = "{{$host}}.{{$.Domain}}"
{{end}}