Add bind-mount liveness guard to cron container
DokPloy rm-rf's the host code dir on every redeploy, orphaning the long-running cron container's ./content and ./.git bind mounts (pinned to the now-deleted inode). The wiki export then spins forever in fs.mkdir against the dead directory and never commits. mount-guard.sh detects a stale mount (directory hard-link count < 2 = a deleted inode) and re-binds it via docker restart, run every 15 min from cron and once at the top of export-content-cron.sh as a fast-fail.
This commit is contained in:
parent
9ed1518d83
commit
15a5c49324
3 changed files with 48 additions and 0 deletions
|
|
@ -4,3 +4,7 @@
|
|||
# Wiki content export to git — daily at 4 AM UTC
|
||||
0 4 * * * . /etc/environment.sh; /app/scripts/export-content-cron.sh >> /var/log/wiki-export.log 2>&1
|
||||
|
||||
# Bind-mount liveness guard — re-binds ./content + ./.git if a DokPloy redeploy
|
||||
# orphaned them (every 15 min, offset off :00 to avoid racing the jobs above).
|
||||
7,22,37,52 * * * * . /etc/environment.sh; /app/scripts/mount-guard.sh >> /var/log/mount-guard.log 2>&1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue