2015-09-02 19:13:25 +00:00
|
|
|
[backends]{{range .Containers}}
|
2015-09-08 20:41:14 +00:00
|
|
|
[backends.backend-{{.Config.Hostname}}]
|
|
|
|
[backends.backend-{{.Config.Hostname}}.servers.server-{{.Config.Hostname}}]
|
2015-09-09 09:39:41 +00:00
|
|
|
|
|
|
|
{{/* Only one exposed port! */}}
|
|
|
|
{{if eq (len .Config.ExposedPorts) 1}}
|
|
|
|
{{$ip := .NetworkSettings.IPAddress}}
|
|
|
|
{{range $keyPort, $valuePort := .Config.ExposedPorts}}
|
|
|
|
url = "http://{{$ip}}:{{$keyPort.Port}}"
|
|
|
|
{{end}}
|
|
|
|
{{else}}
|
|
|
|
|
|
|
|
{{end}}
|
2015-09-02 19:13:25 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
[routes]{{range .Containers}}
|
2015-09-08 20:41:14 +00:00
|
|
|
[routes.route-{{.Config.Hostname}}]
|
|
|
|
backends = ["backend-{{.Config.Hostname}}"]
|
|
|
|
[routes.route-{{.Config.Hostname}}.rules.rule-{{.Config.Hostname}}-hostname]
|
2015-09-02 19:13:25 +00:00
|
|
|
category = "Host"
|
|
|
|
value = "{{.Config.Hostname}}.zenika.fr"
|
2015-09-08 20:41:14 +00:00
|
|
|
[routes.route-{{.Config.Hostname}}.rules.rule-{{.Config.Hostname}}-name]
|
2015-09-02 19:13:25 +00:00
|
|
|
category = "Host"
|
|
|
|
value = "{{.Name | replace "/"}}.zenika.fr"
|
|
|
|
{{end}}
|