From 30ef12a09086b2af78f5f5e1073925d2b3960ec1 Mon Sep 17 00:00:00 2001 From: Moritz Schlarb Date: Mon, 20 Nov 2023 09:49:04 +0100 Subject: [PATCH] Add explicit clarification about variable quoting Closes: #81 --- README.md | 2 ++ docker-compose.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index aadd962..61b1b5b 100644 --- a/README.md +++ b/README.md @@ -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): diff --git a/docker-compose.yml b/docker-compose.yml index 33f068d..074e2b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: ''