-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a note on how to add label to a docker compose file #2611
Conversation
Could you rebase on the 1.5 branch ? |
169a4c1
to
5c14b09
Compare
@ldez done |
@@ -145,6 +145,18 @@ To enable constraints see [backend-specific constraints section](/configuration/ | |||
|
|||
## Labels: overriding default behaviour | |||
|
|||
!!! note | |||
If you use a docker-compose file, labels should be defined in the `deploy` part of your service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/docker-compose file/composefile/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @jmaitrehenry
Many thanks for this PR which can be helpful for docker-compose beginners 😉
I have two little suggestions.
@@ -145,6 +145,18 @@ To enable constraints see [backend-specific constraints section](/configuration/ | |||
|
|||
## Labels: overriding default behaviour | |||
|
|||
!!! note | |||
If you use a docker-compose file, labels should be defined in the `deploy` part of your service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can precise two points :
- This behavior is only enabled for docker-compose API 3+
- Add a ling to the docker-compose documentation : https://docs.docker.com/compose/compose-file/#labels-1
```yaml | ||
version: "3" | ||
services: | ||
nginx: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use another service name? Like whoami
for example? 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups sure, I always use nginx as service example, I didn't realize.
5c14b09
to
b2736af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b2736af
to
c76902e
Compare
What does this PR do?
Add a note to the docker backend documentation page on how to add a label using a docker-compose file.
Motivation
I made the mistake too many time and I still forgot about it.
When reading the documentation, I can't find a notice/note about it.
More
Additional Notes