Fix redirect problem on dashboard + docs/tests on [web]
This commit is contained in:
parent
d0f3ad6024
commit
e2c5f3712f
47 changed files with 134 additions and 88 deletions
|
@ -15,7 +15,7 @@ type DashboardHandler struct{}
|
||||||
func (g DashboardHandler) AddRoutes(router *mux.Router) {
|
func (g DashboardHandler) AddRoutes(router *mux.Router) {
|
||||||
// Expose dashboard
|
// Expose dashboard
|
||||||
router.Methods(http.MethodGet).Path("/").HandlerFunc(func(response http.ResponseWriter, request *http.Request) {
|
router.Methods(http.MethodGet).Path("/").HandlerFunc(func(response http.ResponseWriter, request *http.Request) {
|
||||||
http.Redirect(response, request, "/dashboard/", 302)
|
http.Redirect(response, request, request.Header.Get("X-Forwarded-Prefix")+"/dashboard/", 302)
|
||||||
})
|
})
|
||||||
router.Methods(http.MethodGet).PathPrefix("/dashboard/").
|
router.Methods(http.MethodGet).PathPrefix("/dashboard/").
|
||||||
Handler(http.StripPrefix("/dashboard/", http.FileServer(&assetfs.AssetFS{Asset: genstatic.Asset, AssetInfo: genstatic.AssetInfo, AssetDir: genstatic.AssetDir, Prefix: "static"})))
|
Handler(http.StripPrefix("/dashboard/", http.FileServer(&assetfs.AssetFS{Asset: genstatic.Asset, AssetInfo: genstatic.AssetInfo, AssetDir: genstatic.AssetDir, Prefix: "static"})))
|
||||||
|
|
|
@ -632,8 +632,7 @@ Once a day (the first call begins 10 minutes after the start of Træfik), we col
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":80"
|
address = ":80"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[Docker]
|
[Docker]
|
||||||
endpoint = "tcp://10.10.10.10:2375"
|
endpoint = "tcp://10.10.10.10:2375"
|
||||||
|
@ -663,8 +662,7 @@ Once a day (the first call begins 10 minutes after the start of Træfik), we col
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":80"
|
address = ":80"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[Docker]
|
[Docker]
|
||||||
Endpoint = "xxxx"
|
Endpoint = "xxxx"
|
||||||
|
|
|
@ -161,7 +161,7 @@ curl -s "http://localhost:8080/health" | jq .
|
||||||
// average response time in seconds
|
// average response time in seconds
|
||||||
"average_response_time_sec": 0.8648016000000001,
|
"average_response_time_sec": 0.8648016000000001,
|
||||||
|
|
||||||
// request statistics [requires --web.statistics to be set]
|
// request statistics [requires --statistics to be set]
|
||||||
// ten most recent requests with 4xx and 5xx status codes
|
// ten most recent requests with 4xx and 5xx status codes
|
||||||
"recent_errors": [
|
"recent_errors": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,6 +35,15 @@ address = ":8080"
|
||||||
# Default: false
|
# Default: false
|
||||||
#
|
#
|
||||||
readOnly = true
|
readOnly = true
|
||||||
|
|
||||||
|
|
||||||
|
# Set the root path for webui and API
|
||||||
|
#
|
||||||
|
# Deprecated
|
||||||
|
# Optional
|
||||||
|
#
|
||||||
|
# path = "/mypath"
|
||||||
|
#
|
||||||
```
|
```
|
||||||
|
|
||||||
## Web UI
|
## Web UI
|
||||||
|
@ -375,3 +384,35 @@ curl -s "http://localhost:8080/api" | jq .
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Path
|
||||||
|
|
||||||
|
As web is deprecated, you can handle the `Path` option like this
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[entrypoints.http]
|
||||||
|
address=":80"
|
||||||
|
|
||||||
|
[entrypoints.dashboard]
|
||||||
|
address=":8080"
|
||||||
|
|
||||||
|
[entrypoints.api]
|
||||||
|
address=":8081"
|
||||||
|
|
||||||
|
#Activate API and Dashboard
|
||||||
|
[api]
|
||||||
|
entrypoint="api"
|
||||||
|
|
||||||
|
[file]
|
||||||
|
[backends]
|
||||||
|
[backends.backend1]
|
||||||
|
[backends.backend1.servers.server1]
|
||||||
|
url = "http://127.0.0.1:8081"
|
||||||
|
|
||||||
|
[frontends]
|
||||||
|
[frontends.frontend1]
|
||||||
|
entrypoints=["dashboard"]
|
||||||
|
backend = "backend1"
|
||||||
|
[frontends.frontend1.routes.test_1]
|
||||||
|
rule = "PathPrefixStrip:/yourprefix;PathPrefix:/yourprefix"
|
||||||
|
```
|
|
@ -135,7 +135,7 @@ Users can be specified directly in the toml file, or indirectly by referencing a
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":80"
|
address = ":80"
|
||||||
[entryPoints.http.auth.basic]
|
[entryPoints.http.auth.digest]
|
||||||
users = ["test:traefik:a2688e031edb4be6a3797f3882655c05 ", "test2:traefik:518845800f9e2bfb1f1f740ec24f074e"]
|
users = ["test:traefik:a2688e031edb4be6a3797f3882655c05 ", "test2:traefik:518845800f9e2bfb1f1f740ec24f074e"]
|
||||||
usersFile = "/path/to/.htdigest"
|
usersFile = "/path/to/.htdigest"
|
||||||
```
|
```
|
||||||
|
|
|
@ -108,7 +108,7 @@ version: '2'
|
||||||
services:
|
services:
|
||||||
proxy:
|
proxy:
|
||||||
image: traefik
|
image: traefik
|
||||||
command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
|
command: --api --docker --docker.domain=docker.localhost --logLevel=DEBUG
|
||||||
networks:
|
networks:
|
||||||
- webgateway
|
- webgateway
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -90,7 +90,7 @@ services:
|
||||||
traefik:
|
traefik:
|
||||||
image: traefik:1.5
|
image: traefik:1.5
|
||||||
command:
|
command:
|
||||||
- "--web"
|
- "--api"
|
||||||
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
|
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
|
||||||
- "--entrypoints=Name:https Address::443 TLS"
|
- "--entrypoints=Name:https Address::443 TLS"
|
||||||
- "--defaultentrypoints=http,https"
|
- "--defaultentrypoints=http,https"
|
||||||
|
@ -155,7 +155,7 @@ The initializer in a docker-compose file will be:
|
||||||
image: traefik:1.5
|
image: traefik:1.5
|
||||||
command:
|
command:
|
||||||
- "storeconfig"
|
- "storeconfig"
|
||||||
- "--web"
|
- "--api"
|
||||||
[...]
|
[...]
|
||||||
- "--consul"
|
- "--consul"
|
||||||
- "--consul.endpoint=consul:8500"
|
- "--consul.endpoint=consul:8500"
|
||||||
|
@ -199,7 +199,7 @@ services:
|
||||||
image: traefik:1.5
|
image: traefik:1.5
|
||||||
command:
|
command:
|
||||||
- "storeconfig"
|
- "storeconfig"
|
||||||
- "--web"
|
- "--api"
|
||||||
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
|
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
|
||||||
- "--entrypoints=Name:https Address::443 TLS"
|
- "--entrypoints=Name:https Address::443 TLS"
|
||||||
- "--defaultentrypoints=http,https"
|
- "--defaultentrypoints=http,https"
|
||||||
|
|
|
@ -306,7 +306,7 @@ idleTimeout = "360s"
|
||||||
|
|
||||||
## Securing Ping Health Check
|
## Securing Ping Health Check
|
||||||
|
|
||||||
The `/ping` health-check URL is enabled together with the web admin panel, enabled with the command-line `--web` or config file option `[web]`.
|
The `/ping` health-check URL is enabled with the command-line `--ping` or config file option `[ping]`.
|
||||||
Thus, if you have a regular path for `/foo` and an entrypoint on `:80`, you would access them as follows:
|
Thus, if you have a regular path for `/foo` and an entrypoint on `:80`, you would access them as follows:
|
||||||
|
|
||||||
* Regular path: `http://hostname:80/foo`
|
* Regular path: `http://hostname:80/foo`
|
||||||
|
|
|
@ -57,8 +57,7 @@ RootCAs = [ "./backend.cert" ]
|
||||||
keyFile = "./frontend.key"
|
keyFile = "./frontend.key"
|
||||||
|
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ spec:
|
||||||
- image: traefik
|
- image: traefik
|
||||||
name: traefik-ingress-lb
|
name: traefik-ingress-lb
|
||||||
args:
|
args:
|
||||||
- --web
|
- --api
|
||||||
- --kubernetes
|
- --kubernetes
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
|
@ -182,7 +182,7 @@ spec:
|
||||||
privileged: true
|
privileged: true
|
||||||
args:
|
args:
|
||||||
- -d
|
- -d
|
||||||
- --web
|
- --api
|
||||||
- --kubernetes
|
- --kubernetes
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|
|
@ -70,10 +70,13 @@ logLevel = "DEBUG"
|
||||||
defaultEntryPoints = ["http", "https"]
|
defaultEntryPoints = ["http", "https"]
|
||||||
|
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":8081"
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":80"
|
address = ":80"
|
||||||
[entryPoints.https]
|
[entryPoints.https]
|
||||||
address = ":443"
|
address = ":443"
|
||||||
|
|
||||||
[entryPoints.https.tls]
|
[entryPoints.https.tls]
|
||||||
[[entryPoints.https.tls.certificates]]
|
[[entryPoints.https.tls.certificates]]
|
||||||
certFile = "integration/fixtures/https/snitest.com.cert"
|
certFile = "integration/fixtures/https/snitest.com.cert"
|
||||||
|
@ -94,8 +97,8 @@ defaultEntryPoints = ["http", "https"]
|
||||||
watch = true
|
watch = true
|
||||||
prefix = "traefik"
|
prefix = "traefik"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8081"
|
entrypoint = "api"
|
||||||
```
|
```
|
||||||
|
|
||||||
And there, the same global configuration in the Key-value Store (using `prefix = "traefik"`):
|
And there, the same global configuration in the Key-value Store (using `prefix = "traefik"`):
|
||||||
|
@ -105,6 +108,7 @@ And there, the same global configuration in the Key-value Store (using `prefix =
|
||||||
| `/traefik/loglevel` | `DEBUG` |
|
| `/traefik/loglevel` | `DEBUG` |
|
||||||
| `/traefik/defaultentrypoints/0` | `http` |
|
| `/traefik/defaultentrypoints/0` | `http` |
|
||||||
| `/traefik/defaultentrypoints/1` | `https` |
|
| `/traefik/defaultentrypoints/1` | `https` |
|
||||||
|
| `/traefik/entrypoints/api/address` | `:8081` |
|
||||||
| `/traefik/entrypoints/http/address` | `:80` |
|
| `/traefik/entrypoints/http/address` | `:80` |
|
||||||
| `/traefik/entrypoints/https/address` | `:443` |
|
| `/traefik/entrypoints/https/address` | `:443` |
|
||||||
| `/traefik/entrypoints/https/tls/certificates/0/certfile` | `integration/fixtures/https/snitest.com.cert` |
|
| `/traefik/entrypoints/https/tls/certificates/0/certfile` | `integration/fixtures/https/snitest.com.cert` |
|
||||||
|
@ -115,7 +119,7 @@ And there, the same global configuration in the Key-value Store (using `prefix =
|
||||||
| `/traefik/consul/endpoint` | `127.0.0.1:8500` |
|
| `/traefik/consul/endpoint` | `127.0.0.1:8500` |
|
||||||
| `/traefik/consul/watch` | `true` |
|
| `/traefik/consul/watch` | `true` |
|
||||||
| `/traefik/consul/prefix` | `traefik` |
|
| `/traefik/consul/prefix` | `traefik` |
|
||||||
| `/traefik/web/address` | `:8081` |
|
| `/traefik/api/entrypoint` | `api` |
|
||||||
|
|
||||||
In case you are setting key values manually:
|
In case you are setting key values manually:
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ docker-machine ssh manager "docker service create \
|
||||||
--docker.swarmmode \
|
--docker.swarmmode \
|
||||||
--docker.domain=traefik \
|
--docker.domain=traefik \
|
||||||
--docker.watch \
|
--docker.watch \
|
||||||
--web"
|
--api"
|
||||||
```
|
```
|
||||||
|
|
||||||
Let's explain this command:
|
Let's explain this command:
|
||||||
|
@ -102,7 +102,7 @@ Let's explain this command:
|
||||||
| `--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock` | we bind mount the docker socket where Træfik is scheduled to be able to speak to the daemon. |
|
| `--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock` | we bind mount the docker socket where Træfik is scheduled to be able to speak to the daemon. |
|
||||||
| `--network traefik-net` | we attach the Træfik service (and thus the underlying container) to the `traefik-net` network. |
|
| `--network traefik-net` | we attach the Træfik service (and thus the underlying container) to the `traefik-net` network. |
|
||||||
| `--docker` | enable docker backend, and `--docker.swarmmode` to enable the swarm mode on Træfik. |
|
| `--docker` | enable docker backend, and `--docker.swarmmode` to enable the swarm mode on Træfik. |
|
||||||
| `--web` | activate the webUI on port 8080 |
|
| `--api | activate the webUI on port 8080 |
|
||||||
|
|
||||||
|
|
||||||
## Deploy your apps
|
## Deploy your apps
|
||||||
|
|
|
@ -93,7 +93,7 @@ docker $(docker-machine config mhs-demo0) run \
|
||||||
--docker.tls.key=/ssl/server-key.pem \
|
--docker.tls.key=/ssl/server-key.pem \
|
||||||
--docker.tls.insecureSkipVerify \
|
--docker.tls.insecureSkipVerify \
|
||||||
--docker.watch \
|
--docker.watch \
|
||||||
--web
|
--api
|
||||||
```
|
```
|
||||||
|
|
||||||
Let's explain this command:
|
Let's explain this command:
|
||||||
|
@ -107,7 +107,7 @@ Let's explain this command:
|
||||||
| `--docker` | enable docker backend |
|
| `--docker` | enable docker backend |
|
||||||
| `--docker.endpoint=tcp://172.18.0.1:2376` | connect to the swarm master using the docker_gwbridge network |
|
| `--docker.endpoint=tcp://172.18.0.1:2376` | connect to the swarm master using the docker_gwbridge network |
|
||||||
| `--docker.tls` | enable TLS using the docker-machine keys |
|
| `--docker.tls` | enable TLS using the docker-machine keys |
|
||||||
| `--web` | activate the webUI on port 8080 |
|
| `--api` | activate the webUI on port 8080 |
|
||||||
|
|
||||||
|
|
||||||
## Deploy your apps
|
## Deploy your apps
|
||||||
|
|
|
@ -294,7 +294,10 @@ func (s *ConsulSuite) skipTestGlobalConfigurationWithClientTLS(c *check.C) {
|
||||||
s.setupConsulTLS(c)
|
s.setupConsulTLS(c)
|
||||||
consulHost := s.composeProject.Container(c, "consul").NetworkSettings.IPAddress
|
consulHost := s.composeProject.Container(c, "consul").NetworkSettings.IPAddress
|
||||||
|
|
||||||
err := s.kv.Put("traefik/web/address", []byte(":8081"), nil)
|
err := s.kv.Put("traefik/api/entrypoint", []byte("api"), nil)
|
||||||
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
|
err = s.kv.Put("traefik/entrypoints/api/address", []byte(":8081"), nil)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
// wait for consul
|
// wait for consul
|
||||||
|
@ -341,7 +344,7 @@ func (s *ConsulSuite) TestCommandStoreConfig(c *check.C) {
|
||||||
"/traefik/loglevel": "DEBUG",
|
"/traefik/loglevel": "DEBUG",
|
||||||
"/traefik/defaultentrypoints/0": "http",
|
"/traefik/defaultentrypoints/0": "http",
|
||||||
"/traefik/entrypoints/http/address": ":8000",
|
"/traefik/entrypoints/http/address": ":8000",
|
||||||
"/traefik/web/address": ":8080",
|
"/traefik/api/entrypoint": "traefik",
|
||||||
"/traefik/consul/endpoint": consulHost + ":8500",
|
"/traefik/consul/endpoint": consulHost + ":8500",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,7 @@ func (s *Etcd3Suite) TestCommandStoreConfig(c *check.C) {
|
||||||
"/traefik/loglevel": "DEBUG",
|
"/traefik/loglevel": "DEBUG",
|
||||||
"/traefik/defaultentrypoints/0": "http",
|
"/traefik/defaultentrypoints/0": "http",
|
||||||
"/traefik/entrypoints/http/address": ":8000",
|
"/traefik/entrypoints/http/address": ":8000",
|
||||||
"/traefik/web/address": ":8080",
|
"/traefik/api/entrypoint": "traefik",
|
||||||
"/traefik/etcd/endpoint": ipEtcd + ":4001",
|
"/traefik/etcd/endpoint": ipEtcd + ":4001",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -419,7 +419,7 @@ func (s *EtcdSuite) TestCommandStoreConfig(c *check.C) {
|
||||||
"/traefik/loglevel": "DEBUG",
|
"/traefik/loglevel": "DEBUG",
|
||||||
"/traefik/defaultentrypoints/0": "http",
|
"/traefik/defaultentrypoints/0": "http",
|
||||||
"/traefik/entrypoints/http/address": ":8000",
|
"/traefik/entrypoints/http/address": ":8000",
|
||||||
"/traefik/web/address": ":8080",
|
"/traefik/api/entrypoint": "traefik",
|
||||||
"/traefik/etcd/endpoint": etcdHost + ":4001",
|
"/traefik/etcd/endpoint": etcdHost + ":4001",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,16 @@ defaultEntryPoints = ["http"]
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":7888"
|
||||||
|
|
||||||
checkNewVersion = false
|
checkNewVersion = false
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Web configuration backend
|
# Api configuration
|
||||||
################################################################
|
################################################################
|
||||||
[web]
|
[api]
|
||||||
address = ":7888"
|
entryPoint = "api"
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# File configuration backend
|
# File configuration backend
|
||||||
|
|
|
@ -5,6 +5,8 @@ logLevel = "DEBUG"
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":8081"
|
||||||
|
|
||||||
|
|
||||||
[consul]
|
[consul]
|
||||||
|
@ -12,5 +14,5 @@ logLevel = "DEBUG"
|
||||||
watch = true
|
watch = true
|
||||||
prefix = "traefik"
|
prefix = "traefik"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8081"
|
entryPoint = "api"
|
||||||
|
|
|
@ -3,6 +3,8 @@ defaultEntryPoints = ["http","https"]
|
||||||
logLevel = "DEBUG"
|
logLevel = "DEBUG"
|
||||||
|
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":8081"
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
[entryPoints.https]
|
[entryPoints.https]
|
||||||
|
@ -16,5 +18,5 @@ logLevel = "DEBUG"
|
||||||
prefix = "traefik"
|
prefix = "traefik"
|
||||||
watch = true
|
watch = true
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8081"
|
entryPoint = "api"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
defaultEntryPoints = ["http"]
|
defaultEntryPoints = ["http"]
|
||||||
logLevel = "DEBUG"
|
logLevel = "DEBUG"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
|
|
|
@ -6,7 +6,7 @@ logLevel = "DEBUG"
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
|
|
||||||
[docker]
|
[docker]
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ logLevel = "DEBUG"
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8080"
|
address = ":8080"
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":8081"
|
||||||
|
|
||||||
[dynamodb]
|
[dynamodb]
|
||||||
AccessKeyID = "key"
|
AccessKeyID = "key"
|
||||||
|
@ -12,5 +14,5 @@ logLevel = "DEBUG"
|
||||||
Endpoint = "{{.DynamoURL}}"
|
Endpoint = "{{.DynamoURL}}"
|
||||||
Region = "us-east-1"
|
Region = "us-east-1"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8081"
|
entryPoint = "api"
|
||||||
|
|
|
@ -5,6 +5,8 @@ logLevel = "DEBUG"
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":8081"
|
||||||
|
|
||||||
|
|
||||||
[etcd]
|
[etcd]
|
||||||
|
@ -13,5 +15,5 @@ logLevel = "DEBUG"
|
||||||
watch = true
|
watch = true
|
||||||
useAPIV3 = {{.UseAPIV3}}
|
useAPIV3 = {{.UseAPIV3}}
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8081"
|
entryPoint = "api"
|
|
@ -3,6 +3,8 @@ defaultEntryPoints = ["http","https"]
|
||||||
logLevel = "DEBUG"
|
logLevel = "DEBUG"
|
||||||
|
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":8081"
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
[entryPoints.https]
|
[entryPoints.https]
|
||||||
|
@ -16,5 +18,6 @@ logLevel = "DEBUG"
|
||||||
# prefix = "/traefik"
|
# prefix = "/traefik"
|
||||||
# watch = true
|
# watch = true
|
||||||
|
|
||||||
[web]
|
|
||||||
address = ":8081"
|
[api]
|
||||||
|
entryPoint = "api"
|
|
@ -10,5 +10,4 @@ logLevel = "DEBUG"
|
||||||
[eureka]
|
[eureka]
|
||||||
endpoint = "http://{{.EurekaHost}}:8761/eureka"
|
endpoint = "http://{{.EurekaHost}}:8761/eureka"
|
||||||
delay = "1s"
|
delay = "1s"
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
|
@ -11,8 +11,7 @@ RootCAs = [ """{{ .CertContent }}""" ]
|
||||||
keyFile = """{{ .KeyContent }}"""
|
keyFile = """{{ .KeyContent }}"""
|
||||||
|
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,7 @@ InsecureSkipVerify = true
|
||||||
keyFile = """{{ .KeyContent }}"""
|
keyFile = """{{ .KeyContent }}"""
|
||||||
|
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@ logLevel = "DEBUG"
|
||||||
[entryPoints.http2]
|
[entryPoints.http2]
|
||||||
address = ":9000"
|
address = ":9000"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
[backends]
|
[backends]
|
||||||
|
|
|
@ -8,8 +8,7 @@ logLevel = "DEBUG"
|
||||||
[entryPoints.http2]
|
[entryPoints.http2]
|
||||||
address = ":9000"
|
address = ":9000"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
[backends]
|
[backends]
|
||||||
|
|
|
@ -6,8 +6,7 @@ logLevel = "DEBUG"
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
[backends]
|
[backends]
|
||||||
|
|
|
@ -6,8 +6,7 @@ logLevel = "DEBUG"
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
[backends]
|
[backends]
|
||||||
|
|
|
@ -16,8 +16,7 @@ defaultEntryPoints = ["https"]
|
||||||
certFile = "fixtures/https/snitest.org.cert"
|
certFile = "fixtures/https/snitest.org.cert"
|
||||||
keyFile = "fixtures/https/snitest.org.key"
|
keyFile = "fixtures/https/snitest.org.key"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,7 @@ defaultEntryPoints = ["https"]
|
||||||
certFile = "fixtures/https/snitest.org.cert"
|
certFile = "fixtures/https/snitest.org.cert"
|
||||||
keyFile = "fixtures/https/snitest.org.key"
|
keyFile = "fixtures/https/snitest.org.key"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@ defaultEntryPoints = ["https"]
|
||||||
certFile = "fixtures/https/snitest.org.cert"
|
certFile = "fixtures/https/snitest.org.cert"
|
||||||
keyFile = "fixtures/https/snitest.org.key"
|
keyFile = "fixtures/https/snitest.org.key"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,7 @@ defaultEntryPoints = ["https"]
|
||||||
address = ":8443"
|
address = ":8443"
|
||||||
[entryPoints.https02.tls]
|
[entryPoints.https02.tls]
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@ defaultEntryPoints = ["https"]
|
||||||
certFile = "fixtures/https/snitest.org.cert"
|
certFile = "fixtures/https/snitest.org.cert"
|
||||||
keyFile = "fixtures/https/snitest.org.key"
|
keyFile = "fixtures/https/snitest.org.key"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,7 @@ fblo6RBxUQ==
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8081"
|
address = ":8081"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@ RootCAs = [ "fixtures/https/rootcas/local.crt"]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8081"
|
address = ":8081"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,16 @@ defaultEntryPoints = ["http"]
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":7888"
|
||||||
|
|
||||||
checkNewVersion = false
|
checkNewVersion = false
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Web configuration backend
|
# Api configuration backend
|
||||||
################################################################
|
################################################################
|
||||||
[web]
|
[api]
|
||||||
address = ":7888"
|
entryPoint = "api"
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# File configuration backend
|
# File configuration backend
|
||||||
|
|
|
@ -5,9 +5,11 @@ logLevel = "DEBUG"
|
||||||
[entryPoints]
|
[entryPoints]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
[entryPoints.api]
|
||||||
|
address = ":9090"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":9090"
|
entryPoint = "api"
|
||||||
|
|
||||||
[marathon]
|
[marathon]
|
||||||
endpoint = "{{.MarathonURL}}"
|
endpoint = "{{.MarathonURL}}"
|
||||||
|
|
|
@ -7,8 +7,7 @@ address = ":8000"
|
||||||
[entryPoints.http.proxyProtocol]
|
[entryPoints.http.proxyProtocol]
|
||||||
trustedIPs = ["{{.HaproxyIP}}"]
|
trustedIPs = ["{{.HaproxyIP}}"]
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ address = ":8000"
|
||||||
[entryPoints.http.proxyProtocol]
|
[entryPoints.http.proxyProtocol]
|
||||||
trustedIPs = ["1.2.3.4"]
|
trustedIPs = ["1.2.3.4"]
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,4 @@ defaultEntryPoints = ["http"]
|
||||||
[entryPoints.http]
|
[entryPoints.http]
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
|
@ -8,8 +8,7 @@ defaultEntryPoints = ["http"]
|
||||||
[accessLog]
|
[accessLog]
|
||||||
format = "json"
|
format = "json"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[forwardingTimeouts]
|
[forwardingTimeouts]
|
||||||
dialTimeout = "300ms"
|
dialTimeout = "300ms"
|
||||||
|
|
|
@ -7,8 +7,7 @@ logLevel = "DEBUG"
|
||||||
address = ":8000"
|
address = ":8000"
|
||||||
|
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,7 @@ InsecureSkipVerify=true
|
||||||
certFile = "resources/tls/local.cert"
|
certFile = "resources/tls/local.cert"
|
||||||
keyFile = "resources/tls/local.key"
|
keyFile = "resources/tls/local.key"
|
||||||
|
|
||||||
[web]
|
[api]
|
||||||
address = ":8080"
|
|
||||||
|
|
||||||
[file]
|
[file]
|
||||||
|
|
||||||
|
|
5
integration/resources/compose/addprefix.yml
Normal file
5
integration/resources/compose/addprefix.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
whoami1:
|
||||||
|
image: emilevauge/whoami
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.frontend.rule=AddPrefix:/whoami;PathPrefix:/
|
Loading…
Add table
Add a link
Reference in a new issue