Skip to content

BACKUP_STOP_CONTAINER_LABEL not stopping container when referencing an env variable #321

Closed Answered by m90
cxhamilton asked this question in Q&A
Discussion options

You must be logged in to vote

Your assumptions are correct, yes. Even if expanding env vars by default would probably make sense, it's a breaking change I can't easily introduce here (see #80).

I think there should be a workaround for you though. When you use the conf.d feature and mount your configuration file into the container, its content will be sourced before the values are passed to the script. I think this should expand the values in your .env files and give you what you want, even if it's a bit pell-mell.

See

for file in /etc/dockervolumebackup/conf.d/*; do
source $file
BACKUP_CRON_EXPRESSION="${BACKUP_CRON_EXPRESSION:-@daily}"

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@m90
Comment options

m90 Dec 31, 2023
Maintainer

@cxhamilton
Comment options

@cxhamilton
Comment options

@m90
Comment options

m90 Jan 2, 2024
Maintainer

Answer selected by cxhamilton
@cxhamilton
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
support Support Requests
2 participants