docs(storage): replace Alarik with RustFS
Heimdall Gitea / Build and tests (pull_request) Failing after 23m28s
Heimdall Gitea / Publish versioned release (pull_request) Skipped

This commit is contained in:
Arnaud Dartois committed 2026-10-21 16:03:16 +02:00
1 parent 2cc39e9d09
commit 1c8cd508bd
17 files changed
+191 -203

No files matched your search

+9 -9
View File
@@ -1,12 +1,12 @@
# ─── Heimdall — Backup Cron Service ──────────────────────────────
# Overlay for docker-compose.yml: adds a cron container that runs
# PostgreSQL backups daily and Alarik mirrors weekly.
# PostgreSQL backups daily and RustFS mirrors weekly.
#
# Usage:
# docker compose -f docker/docker-compose.yml -f docker/docker-compose.backup.yml up -d
#
# The cron service mounts the scripts directory and a backup volume.
# PostgreSQL dumps are uploaded to Alarik/S3 when configured.
# PostgreSQL dumps are uploaded to RustFS/S3 when configured.
#
# Requires: .env with DATABASE_URL, S3 credentials (optional for local-only backups)
# ──────────────────────────────────────────────────────────────────
@@ -22,11 +22,11 @@ services:
POSTGRES_DB: ${POSTGRES_DB:-heimdall}
POSTGRES_USER: ${POSTGRES_USER:-heimdall}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
# S3/Alarik config (optional — backup works local-only without these)
ALARIK_ENDPOINT: ${ALARIK_ENDPOINT:-}
ALARIK_ACCESS_KEY: ${ALARIK_ACCESS_KEY:-${S3_ACCESS_KEY:-}}
ALARIK_SECRET_KEY: ${ALARIK_SECRET_KEY:-${S3_SECRET_KEY:-}}
ALARIK_BUCKET: ${ALARIK_BUCKET:-${S3_BUCKET:-heimdall}}
# S3/RustFS config (optional — backup works local-only without these)
RUSTFS_ENDPOINT: ${RUSTFS_ENDPOINT:-http://rustfs:9000}
RUSTFS_ACCESS_KEY: ${RUSTFS_ACCESS_KEY:-${S3_ACCESS_KEY:-}}
RUSTFS_SECRET_KEY: ${RUSTFS_SECRET_KEY:-${S3_SECRET_KEY:-}}
RUSTFS_BUCKET: ${RUSTFS_BUCKET:-${S3_BUCKET:-heimdall}}
# Backup config
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-30}
BACKUP_RETENTION_WEEKS: ${BACKUP_RETENTION_WEEKS:-12}
@@ -53,8 +53,8 @@ services:
# Create crontab
echo "# Daily PostgreSQL backup at 02:00 UTC" > /tmp/crontab.txt
echo "0 2 * * * /scripts/backup.sh >> /var/log/backup.log 2>&1" >> /tmp/crontab.txt
echo "# Weekly Alarik mirror on Sundays at 03:00 UTC" >> /tmp/crontab.txt
echo "0 3 * * 0 /scripts/backup-alarik.sh >> /var/log/backup-alarik.log 2>&1" >> /tmp/crontab.txt
echo "# Weekly RustFS mirror on Sundays at 03:00 UTC" >> /tmp/crontab.txt
echo "0 3 * * 0 /scripts/backup-rustfs.sh >> /var/log/backup-rustfs.log 2>&1" >> /tmp/crontab.txt
echo "# Log rotation weekly" >> /tmp/crontab.txt
echo "0 4 * * 0 if [ -f /var/log/backup.log ]; then mv /var/log/backup.log /var/log/backup.log.\$$(date +\%Y\%W); fi" >> /tmp/crontab.txt