Fix cron container: pass env vars to cron jobs
Alpine crond doesn't inherit the container environment, so OUTLINE_API_TOKEN and other vars were missing. Dump env at startup and source it in each cron entry.
This commit is contained in:
parent
8e7424ed05
commit
8514476030
2 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Outline database + file backup — daily at 3 AM UTC
|
||||
0 3 * * * /app/scripts/outline-backup.sh /backups/outline >> /var/log/outline-backup.log 2>&1
|
||||
0 3 * * * . /etc/environment.sh; /app/scripts/outline-backup.sh /backups/outline >> /var/log/outline-backup.log 2>&1
|
||||
|
||||
# Wiki content export to git — daily at 4 AM UTC
|
||||
0 4 * * * /app/scripts/export-content-cron.sh >> /var/log/wiki-export.log 2>&1
|
||||
0 4 * * * . /etc/environment.sh; /app/scripts/export-content-cron.sh >> /var/log/wiki-export.log 2>&1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue