mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-09-21 13:31:42 +00:00
Wire the backup service against the Synology share over SMB/CIFS (the NAS authenticates with a user/password; NFS is IP-allowlist only). Also fixes three defects found bringing the service up live: - entrypoint crash-loop: dcron's crond fails "setpgid: Operation not permitted" in this runtime -> use busybox crond; make repo-init idempotent (check via `restic cat config`, tolerate init-on-existing) so a transient CIFS/lock hiccup can't kill PID 1. - OOM: pg_dump of a ~276MB DB + tar + restic exceeded the 256M cap -> 1G. - live tar abort: GNU tar exits 1 when TDLib files change mid-read (worker is live); per design this is best-effort, so tolerate exit 1, fatal only >=2. Kuma push is now optional (empty URL disables alerting) since it's deferred. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
14 lines
431 B
Docker
14 lines
431 B
Docker
FROM alpine:3.20
|
|
|
|
# Note: use busybox's built-in crond (Alpine base), NOT the dcron package —
|
|
# dcron's crond fails with "setpgid: Operation not permitted" in this runtime.
|
|
RUN apk add --no-cache restic postgresql16-client curl tzdata tar bash
|
|
|
|
COPY backup/backup.sh /backup.sh
|
|
COPY backup/entrypoint.sh /entrypoint.sh
|
|
COPY backup/crontab /etc/crontabs/root
|
|
|
|
RUN chmod +x /backup.sh /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|