Merge pull request #208 from tannakartikey/add_labels_to_traefik
Labels can be added to Traefik
This commit is contained in:
15
README.md
15
README.md
@@ -514,6 +514,21 @@ traefik:
|
||||
|
||||
This starts the Traefik container with `--volume /tmp/example.json:/tmp/example.json --publish 8080:8080 --memory 512m` arguments to `docker run`.
|
||||
|
||||
### Traefik container lables
|
||||
|
||||
Add labels to Traefik Docker container.
|
||||
|
||||
```yaml
|
||||
traefik:
|
||||
lables:
|
||||
- traefik.enable: true
|
||||
- traefik.http.routers.dashboard.rule: Host(`traefik.example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
|
||||
- traefik.http.routers.dashboard.service: api@internal
|
||||
- traefik.http.routers.dashboard.middlewares: auth
|
||||
- traefik.http.middlewares.auth.basicauth.users: test:$2y$05$H2o72tMaO.TwY1wNQUV1K.fhjRgLHRDWohFvUZOJHBEtUXNKrqUKi # test:password
|
||||
```
|
||||
|
||||
This labels Traefik container with `--label traefik.http.routers.dashboard.middlewares=\"auth\"` and so on.
|
||||
|
||||
### Traefik alternate entrypoints
|
||||
|
||||
|
||||
Reference in New Issue
Block a user