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