Docs on traefik.frontend. rule and value labels in Docker and Marathon.

This commit is contained in:
emile 2015-10-23 17:43:10 +02:00
parent d671cc3821
commit 32bfecff83

View file

@ -25,7 +25,7 @@ It supports several backends ([Docker :whale:](https://www.docker.com/), [Mesos/
Basically, Træfɪk is a http router, which sends traffic from frontends to http backends, following rules you have configured. Basically, Træfɪk is a http router, which sends traffic from frontends to http backends, following rules you have configured.
### Frontends ### <a id="frontends"></a> Frontends
Frontends can be defined using the following rules: Frontends can be defined using the following rules:
@ -409,9 +409,11 @@ Labels can be used on containers to override default behaviour:
- `traefik.port=80`: register this port. Useful when the container exposes multiples ports. - `traefik.port=80`: register this port. Useful when the container exposes multiples ports.
- `traefik.weight=10`: assign this weight to the container - `traefik.weight=10`: assign this weight to the container
- `traefik.enable=false`: disable this container in Træfɪk - `traefik.enable=false`: disable this container in Træfɪk
- `traefik.host=bar`: override the default routing from `{containerName}.{domain}` to `bar.{domain}` - `traefik.frontend.rule=Host`: override the default frontend rule (Default: Host). See [frontends](#frontends).
- `traefik.frontend.value=test.example.com`: override the default frontend value (Default: `{containerName}.{domain}`) See [frontends](#frontends).
* `traefik.domain=traefik.localhost`: override the default domain * `traefik.domain=traefik.localhost`: override the default domain
## <a id="marathon"></a> Marathon backend ## <a id="marathon"></a> Marathon backend
Træfɪk can be configured to use Marathon as a backend configuration: Træfɪk can be configured to use Marathon as a backend configuration:
@ -464,12 +466,11 @@ domain = "marathon.localhost"
Labels can be used on containers to override default behaviour: Labels can be used on containers to override default behaviour:
- `traefik.backend=foo`: assign the application to `foo` backend
- `traefik.port=80`: register this port. Useful when the application exposes multiples ports. - `traefik.port=80`: register this port. Useful when the application exposes multiples ports.
- `traefik.weight=10`: assign this weight to the application - `traefik.weight=10`: assign this weight to the application
- `traefik.enable=false`: disable this application in Træfɪk - `traefik.enable=false`: disable this application in Træfɪk
- `traefik.host=bar`: override the default routing from `{appName}.{domain}` to `bar.{domain}` - `traefik.frontend.rule=Host`: override the default frontend rule (Default: Host). See [frontends](#frontends).
- `traefik.prefixes=pf1,pf2`: use `PathPrefix(es)` instead of hostname for routing, use `filename="templates/marathon-prefix.tmpl"` with this option - `traefik.frontend.value=test.example.com`: override the default frontend value (Default: `{appName}.{domain}`) See [frontends](#frontends).
* `traefik.domain=traefik.localhost`: override the default domain * `traefik.domain=traefik.localhost`: override the default domain
## <a id="consul"></a> Consul backend ## <a id="consul"></a> Consul backend