We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm having a weird issue, I set this in my docker-compose.yml:
... environment: - TZ=${TZ} - BORG_PASSPHRASE=${BORG_PASSPHRASE} - BACKUP_CRON=${BACKUP_CRON}
and I have a .env file:
TZ=Europe/Berlin BORG_PASSPHRASE="mypass" VOLUME_SOURCE=/home/ BACKUP_CRON="20 */4 * * *" ...
If I run:
docker compose up -d docker exec -it borgmatic bash
and then run env inside the container, I can see all my env vars just fine.
env
If I shut down the container and run: docker compose run --rm borgmatic env I can only see the following vars:
docker compose run --rm borgmatic env
SHLVL=1 OLDPWD=/ PATH=/command:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD=/
But, if I run docker compose run --rm borgmatic borgmatic list I can see this output:
docker compose run --rm borgmatic borgmatic list
... Time Zone: Europe/Berlin ----------------------------------- Applying custom cron Cron job set as: 20 */4 * * * /usr/local/bin/borgmatic --stats -v 0 2>&1 crond: crond (busybox 1.37.0) started, log level 8 Enter passphrase for key ssh://myuser@myhost/./myrepo:
So it's correctly getting the TZ and BACKUP_CRON vars, but not BORG_PASSPHRASE.
TZ
BACKUP_CRON
BORG_PASSPHRASE
My end goal is to setup cron on the host and run backups with docker compose run instead of having the container always running with its own cron.
docker compose run
What's wrong with my setup?
The text was updated successfully, but these errors were encountered:
Nevermind, just found this and fixed with S6_KEEP_ENV=1
S6_KEEP_ENV=1
Sorry, something went wrong.
No branches or pull requests
I'm having a weird issue, I set this in my docker-compose.yml:
and I have a .env file:
If I run:
and then run
env
inside the container, I can see all my env vars just fine.If I shut down the container and run:
docker compose run --rm borgmatic env
I can only see the following vars:
But, if I run
docker compose run --rm borgmatic borgmatic list
I can see this output:
So it's correctly getting the
TZ
andBACKUP_CRON
vars, but notBORG_PASSPHRASE
.My end goal is to setup cron on the host and run backups with
docker compose run
instead of having the container always running with its own cron.What's wrong with my setup?
The text was updated successfully, but these errors were encountered: