traefik/templates/docker.tmpl

18 lines
735 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 "." "-"}}]
2015-10-23 18:59:08 +02:00
url = "{{getProtocol .}}://{{.NetworkSettings.IPAddress}}:{{getPort .}}"
2015-09-10 16:14:08 +02:00
weight = {{getWeight .}}
2015-09-02 21:13:25 +02:00
{{end}}
[frontends]{{range $frontend, $containers := .Frontends}}
[frontends."frontend-{{$frontend}}"]{{$container := index $containers 0}}
2015-09-09 17:41:33 +02:00
backend = "backend-{{getBackend $container}}"
passHostHeader = {{getPassHostHeader $container}}
2016-02-01 16:08:58 +01:00
entryPoints = [{{range getEntryPoints $container}}
"{{.}}",
{{end}}]
[frontends."frontend-{{$frontend}}".routes."route-frontend-{{$frontend}}"]
rule = "{{getFrontendRule $container}}"
value = "{{getFrontendValue $container}}"
2015-10-23 18:59:08 +02:00
{{end}}