Skip to content

Commit

Permalink
Add explicit clarification about variable quoting
Browse files Browse the repository at this point in the history
Closes: #81
  • Loading branch information
moschlar committed Nov 20, 2023
1 parent b555040 commit 30ef12a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ Example:
--mount type=bind,source=/root/.docker/config.json,target=/root/.docker/config.json,ro \
containrrr/shepherd

*Note that the quotes in the command above are evaluated by your shell and are not part of the environment variable value! - See also the note in [docker-compose.yml](docker-compose.yml)!*

## Running on a cron schedule

When running shepherd as described with a `SLEEP_TIME`, the de facto running times will drift the longer the container is running. If you want to run shepherd on a fixed schedule instead, it is recommended to pair it with [swarm-cronjob](https://github.com/crazy-max/swarm-cronjob):
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ services:
build: .
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!
TZ: 'US/Eastern'
SLEEP_TIME: '5m'
FILTER_SERVICES: ''
Expand Down

0 comments on commit 30ef12a

Please sign in to comment.