web provider
This commit is contained in:
parent
03a45f08e2
commit
182a829284
3 changed files with 22 additions and 16 deletions
|
@ -29,11 +29,12 @@
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="panel panel-default col-md-5">
|
|
||||||
|
<div class="panel-default col-md-6">
|
||||||
<div class="panel-heading">Backends</div>
|
<div class="panel-heading">Backends</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{{range $keyBackends, $valueBackends := .Configuration.Backends}}
|
{{range $keyBackends, $valueBackends := .Configuration.Backends}}
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary" id="{{$keyBackends}}">
|
||||||
<div class="panel-heading">{{$keyBackends}}</div>
|
<div class="panel-heading">{{$keyBackends}}</div>
|
||||||
<table class="table table-striped table-hover">
|
<table class="table table-striped table-hover">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -52,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel panel-default col-md-5 col-md-offset-2">
|
<div class="panel-default col-md-6">
|
||||||
<div class="panel-heading">Routes</div>
|
<div class="panel-heading">Routes</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{{range $keyRoutes, $valueRoutes := .Configuration.Routes}}
|
{{range $keyRoutes, $valueRoutes := .Configuration.Routes}}
|
||||||
|
@ -60,7 +61,10 @@
|
||||||
<div class="panel-heading">{{$keyRoutes}}</div>
|
<div class="panel-heading">{{$keyRoutes}}</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
{{range $backend := $valueRoutes.Backends}}
|
{{range $backend := $valueRoutes.Backends}}
|
||||||
<button type="button" class="btn btn-info">{{$backend}}</button>
|
<!--<button type="button" class="btn btn-info">{{$backend}}</button>-->
|
||||||
|
<a class="btn btn-info" role="button" data-toggle="collapse" href="#{{$backend}}" aria-expanded="false">
|
||||||
|
{{$backend}}
|
||||||
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-striped table-hover">
|
<table class="table table-striped table-hover">
|
||||||
|
@ -81,7 +85,9 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
12
docker.tmpl
12
docker.tmpl
|
@ -1,16 +1,16 @@
|
||||||
[backends]{{range .Containers}}
|
[backends]{{range .Containers}}
|
||||||
[backends.{{.Config.Hostname}}]
|
[backends.backend-{{.Config.Hostname}}]
|
||||||
[backends.{{.Config.Hostname}}.servers.{{.Config.Hostname}}]
|
[backends.backend-{{.Config.Hostname}}.servers.server-{{.Config.Hostname}}]
|
||||||
url = "http://{{.NetworkSettings.IPAddress}}:80"
|
url = "http://{{.NetworkSettings.IPAddress}}:80"
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
[routes]{{range .Containers}}
|
[routes]{{range .Containers}}
|
||||||
[routes.{{.Config.Hostname}}]
|
[routes.route-{{.Config.Hostname}}]
|
||||||
backends = ["{{.Config.Hostname}}"]
|
backends = ["backend-{{.Config.Hostname}}"]
|
||||||
[routes.{{.Config.Hostname}}.rules.{{.Config.Hostname}}-hostname]
|
[routes.route-{{.Config.Hostname}}.rules.rule-{{.Config.Hostname}}-hostname]
|
||||||
category = "Host"
|
category = "Host"
|
||||||
value = "{{.Config.Hostname}}.zenika.fr"
|
value = "{{.Config.Hostname}}.zenika.fr"
|
||||||
[routes.{{.Config.Hostname}}.rules.{{.Config.Hostname}}-name]
|
[routes.route-{{.Config.Hostname}}.rules.rule-{{.Config.Hostname}}-name]
|
||||||
category = "Host"
|
category = "Host"
|
||||||
value = "{{.Name | replace "/"}}.zenika.fr"
|
value = "{{.Name | replace "/"}}.zenika.fr"
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#[docker]
|
[docker]
|
||||||
#endpoint = "unix:///var/run/docker.sock"
|
endpoint = "unix:///var/run/docker.sock"
|
||||||
#watch = true
|
watch = true
|
||||||
|
|
||||||
[web]
|
[web]
|
||||||
address = ":8010"
|
address = ":8010"
|
||||||
|
|
||||||
[file]
|
#[file]
|
||||||
filename = "tortuous.toml"
|
#filename = "tortuous.toml"
|
||||||
watch = true
|
#watch = true
|
||||||
|
|
||||||
[backends]
|
[backends]
|
||||||
[backends.backend1]
|
[backends.backend1]
|
||||||
|
|
Loading…
Reference in a new issue