Update README.md

- Added an small FAQ
- Added usage examples
- Added new label 'traefik.frontend.rule', more useful to add your own domains
This commit is contained in:
cr0hn 2018-03-25 16:01:39 +02:00 committed by GitHub
parent 71fbe34537
commit ffb61694a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,7 @@ Use this labels if you choose extenal rancher integration.
- traefik.backend.loadbalancer.method = < drr | wrr > # Override default lb algorithm `drr`
- traefik.backend.circuitbreaker.expression = < expression > # Override default backend circuitbreaker expression `NetworkErrorRatio() > 0.5`
- traefik.frontend.passHostHeader = < true | false > # Forward client Host header to the backend. Default `true`
- traefik.frontend.rule = < rule > # Rule for host. Usually used to specify a host. I.e: 'Host:MySite.com'
- traefik.weight = < weight > # Override default backend weight `5`
- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". traefik.domain is appended. WARNING: You could have collisions BE CAREFULL
- traefik.alias.fqdn = < alias fqdn > # Alternate names to route rule. Multiple values separated by ",". traefik.domain must be defined but is not appended here.
@ -102,4 +103,24 @@ More info [rancher-traefik](https://github.com/rawmind0/rancher-traefik)
Note: To access the services, you need to create A or CNAMES dns entries for every one.
### Usage examples
#### Setup Traefik for a custom domain
You must set these labels for the service your want to expose:
- traefik.port = 8080
- traefik.acme = true
- traefik.frontend.rule = Host:MyCustoDomain.com
- traefik.enable = true
### F.A.Q
#### Q: Traefik doesn't expose my service
Depending of de Traefik configuration we can diffenciate two cases:
- If you configured Traefik with label *rancher_healthcheck=true* -> ensure your service has a healthcheck
- If you configured Traefik without healthcheck, then check the Traefik log. Some times Traefik fails when try to load an invalid config and, before that, doesn't load new services -> restart Traefik should fix that
### References
[traefik rancher backend]: https://docs.traefik.io/configuration/backends/rancher/#labels-overriding-default-behaviour