This commit is contained in:
parent
5dea2e7902
commit
d671cc3821
6 changed files with 157 additions and 95 deletions
|
@ -1,14 +1,13 @@
|
|||
[backends]{{range .Containers}}
|
||||
[backends.backend-{{getBackend .}}.servers.server-{{.Name | replace "/" "" | replace "." "-"}}]
|
||||
url = "http://{{.NetworkSettings.IPAddress}}:{{getPort .}}"
|
||||
url = "{{getProtocole .}}://{{.NetworkSettings.IPAddress}}:{{getPort .}}"
|
||||
weight = {{getWeight .}}
|
||||
{{end}}
|
||||
|
||||
[frontends]{{range $host, $containers := .Hosts}}
|
||||
[frontends.frontend-{{$host}}]
|
||||
{{$container := index $containers 0}}
|
||||
[frontends]{{range $frontend, $containers := .Frontends}}
|
||||
[frontends."frontend-{{$frontend}}"]{{$container := index $containers 0}}
|
||||
backend = "backend-{{getBackend $container}}"
|
||||
[frontends.frontend-{{$host}}.routes.route-host-{{$host}}]
|
||||
rule = "Host"
|
||||
value = "{{$host}}.{{getDomain $container}}"
|
||||
[frontends."frontend-{{$frontend}}".routes."route-frontend-{{$frontend}}"]
|
||||
rule = "{{getFrontendRule $container}}"
|
||||
value = "{{getFrontendValue $container}}"
|
||||
{{end}}
|
Loading…
Add table
Add a link
Reference in a new issue