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

+35 -41
View File
@@ -9,8 +9,8 @@
# openssl rand -base64 32 > docker/secrets/jwt_refresh_key
# openssl rand -base64 32 > docker/secrets/coturn_secret
# echo -n "your-db-password" > docker/secrets/db_password
# echo -n "your-alarik-admin-password" > docker/secrets/alarik_admin_password
# echo -n "your-alarik-jwt" > docker/secrets/alarik_jwt
# openssl rand -hex 12 > docker/secrets/rustfs_access_key
# openssl rand -base64 32 > docker/secrets/rustfs_secret_key
# echo -n "your-smtp-password" > docker/secrets/smtp_password
#
# Images are published by the CI pipeline on main branch pushes:
@@ -51,38 +51,24 @@ services:
networks:
- heimdall-net
alarik:
image: ghcr.io/achtungsoftware/alarik:latest
rustfs:
image: rustfs/rustfs:latest
restart: unless-stopped
ports:
- "${ALARIK_API_PORT:-9000}:8080"
- "${RUSTFS_API_PORT:-9000}:9000"
- "${RUSTFS_CONSOLE_PORT:-9001}:9001"
environment:
API_BASE_URL: ${ALARIK_API_BASE_URL:-http://localhost:9000}
CONSOLE_BASE_URL: ${ALARIK_CONSOLE_BASE_URL:-http://localhost:9001}
ADMIN_USERNAME: ${ALARIK_ADMIN_USERNAME:-heimdall}
ADMIN_PASSWORD_FILE: /run/secrets/alarik_admin_password
JWT_FILE: /run/secrets/alarik_jwt
ALLOW_ACCOUNT_CREATION: false
RUSTFS_VOLUMES: /data
RUSTFS_ADDRESS: 0.0.0.0:9000
RUSTFS_CONSOLE_ADDRESS: 0.0.0.0:9001
RUSTFS_CONSOLE_ENABLE: "true"
RUSTFS_ACCESS_KEY_FILE: /run/secrets/rustfs_access_key
RUSTFS_SECRET_KEY_FILE: /run/secrets/rustfs_secret_key
secrets:
- alarik_admin_password
- alarik_jwt
- rustfs_access_key
- rustfs_secret_key
volumes:
- alarik_storage:/app/Storage
logging: *default-logging
networks:
- heimdall-net
alarik-console:
image: ghcr.io/achtungsoftware/alarik-console:latest
restart: unless-stopped
ports:
- "${ALARIK_CONSOLE_PORT:-9001}:3000"
environment:
NUXT_PUBLIC_API_BASE_URL: ${ALARIK_API_BASE_URL:-http://localhost:9000}
NUXT_PUBLIC_CONSOLE_BASE_URL: ${ALARIK_CONSOLE_BASE_URL:-http://localhost:9001}
NUXT_PUBLIC_ALLOW_ACCOUNT_CREATION: false
depends_on:
- alarik
- rustfs_data:/data
logging: *default-logging
networks:
- heimdall-net
@@ -251,11 +237,11 @@ services:
POSTGRES_DB: ${POSTGRES_DB:-heimdall}
POSTGRES_USER: ${POSTGRES_USER:-heimdall}
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
# S3/Alarik config (optional — backup works local-only without these)
ALARIK_ENDPOINT: ${ALARIK_ENDPOINT:-}
ALARIK_ACCESS_KEY: ${ALARIK_ACCESS_KEY:-}
ALARIK_SECRET_KEY: ${ALARIK_SECRET_KEY:-}
ALARIK_BUCKET: ${ALARIK_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:-}
RUSTFS_SECRET_KEY: ${RUSTFS_SECRET_KEY:-}
RUSTFS_BUCKET: ${RUSTFS_BUCKET:-heimdall}
# Backup config
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-30}
BACKUP_RETENTION_WEEKS: ${BACKUP_RETENTION_WEEKS:-12}
@@ -263,6 +249,8 @@ services:
TZ: Europe/Paris
secrets:
- db_password
- rustfs_access_key
- rustfs_secret_key
volumes:
- ./scripts:/scripts:ro
- backup_data:/backups
@@ -280,6 +268,12 @@ services:
if [ -f /run/secrets/db_password ]; then
export POSTGRES_PASSWORD="$(cat /run/secrets/db_password)"
fi
if [ -f /run/secrets/rustfs_access_key ]; then
export RUSTFS_ACCESS_KEY="$(cat /run/secrets/rustfs_access_key)"
fi
if [ -f /run/secrets/rustfs_secret_key ]; then
export RUSTFS_SECRET_KEY="$(cat /run/secrets/rustfs_secret_key)"
fi
apk add --no-cache curl bash > /dev/null 2>&1 || true
curl -sSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc 2>/dev/null || true
@@ -289,8 +283,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
@@ -369,7 +363,7 @@ services:
volumes:
pgdata:
driver: local
alarik_storage:
rustfs_data:
driver: local
agent_state:
driver: local
@@ -397,10 +391,10 @@ secrets:
file: ./secrets/jwt_refresh_key
coturn_secret:
file: ./secrets/coturn_secret
alarik_admin_password:
file: ./secrets/alarik_admin_password
alarik_jwt:
file: ./secrets/alarik_jwt
rustfs_access_key:
file: ./secrets/rustfs_access_key
rustfs_secret_key:
file: ./secrets/rustfs_secret_key
smtp_password:
file: ./secrets/smtp_password
rabbitmq_password: