-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example for extensive label usage (Closes: #106)
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: "3" | ||
|
||
services: | ||
shepherd: | ||
image: containrrr/shepherd | ||
environment: | ||
# Beware YAML gotchas regarding quoting: | ||
# With KEY: 'VALUE', quotes are part of yaml syntax and thus get stripped | ||
# but with KEY='VALUE', they are part of the value and stay there, | ||
# causing problems! | ||
SLEEP_TIME: "1d" | ||
TZ: "US/Eastern" | ||
VERBOSE: "true" | ||
IGNORELIST_SERVICES: "label=shepherd.autodeploy=false" | ||
FILTER_SERVICES: "label=shepherd.autodeploy=true" | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
deploy: | ||
placement: | ||
constraints: | ||
- node.role == manager | ||
|
||
# Explicitly enable shepherd for this service | ||
updating-app: | ||
image: hello-world | ||
deploy: | ||
labels: | ||
- shepherd.autodeploy=true | ||
|
||
# Explicitly disable shepherd for this service | ||
not-updating-app: | ||
image: hello-world | ||
deploy: | ||
labels: | ||
- shepherd.autodeploy=false | ||
|
||
# Implicitly disable shepherd for this service | ||
# because of FILTER_SERVICES above | ||
another-not-updating-app: | ||
image: hello-world |
a506c97
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.
You rock thanks!