Skip to content

Commit

Permalink
Explained the latest modifications of Traefik container labels
Browse files Browse the repository at this point in the history
  • Loading branch information
tannakartikey authored and ncreuschling committed Apr 12, 2023
1 parent 71026d2 commit 6047a59
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ You can specialize the default Traefik rules by setting labels on the containers

```yaml
labels:
traefik.http.routers.hey.rule: Host(`app.hey.com`)
traefik.http.routers.hey-web.rule: Host(`app.hey.com`)
```
Traefik rules are in the "service-role-destination" format. The default role will be `web` if no rule is specified. If the destination is not specified, it is not included. To give an example, the above rule would become "traefik.http.routers.hey-web.rule" if it was for the "staging" destination.

Note: The backticks are needed to ensure the rule is passed in correctly and not treated as command substitution by Bash!

Expand Down

0 comments on commit 6047a59

Please sign in to comment.