mirror of
https://github.com/traefik/traefik.git
synced 2025-09-29 01:31:13 +02:00
Clarify docs with labels in Swarm Mode
This commit is contained in:
parent
9cf6827ccc
commit
2617de2cdd
@ -45,7 +45,7 @@ Attach labels to your containers and let Traefik do the rest!
|
|||||||
swarmMode = true
|
swarmMode = true
|
||||||
```
|
```
|
||||||
|
|
||||||
Attaching labels to containers (in your docker compose file)
|
Attach labels to services (not to containers) while in Swarm mode (in your docker compose file)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "3"
|
version: "3"
|
||||||
@ -57,7 +57,7 @@ Attach labels to your containers and let Traefik do the rest!
|
|||||||
```
|
```
|
||||||
|
|
||||||
!!! important "Labels in Docker Swarm Mode"
|
!!! important "Labels in Docker Swarm Mode"
|
||||||
If you use a compose file with the Swarm mode, labels should be defined in the `deploy` part of your service.
|
While in Swarm Mode, Traefik uses labels found on services, not on individual containers. Therefore, if you use a compose file with Swarm Mode, labels should be defined in the `deploy` part of your service.
|
||||||
This behavior is only enabled for docker-compose version 3+ ([Compose file reference](https://docs.docker.com/compose/compose-file/#labels-1)).
|
This behavior is only enabled for docker-compose version 3+ ([Compose file reference](https://docs.docker.com/compose/compose-file/#labels-1)).
|
||||||
|
|
||||||
## Provider Configuration Options
|
## Provider Configuration Options
|
||||||
|
Loading…
x
Reference in New Issue
Block a user