security hardening + drafts/attachments

This commit is contained in:
2026-02-21 19:10:56 -05:00
parent 1dc99eb681
commit a0105956e4
35 changed files with 4928 additions and 0 deletions

26
scripts/restore.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
if [ $# -ne 1 ]; then
echo "Usage: $0 <backup-archive.tar.gz>"
exit 1
fi
ARCHIVE="$1"
HERE=$(cd "$(dirname "$0")/.." && pwd)
cd "$HERE"
echo "[restore] stopping containers..."
docker compose down
echo "[restore] wiping data/..."
rm -rf data
echo "[restore] extracting $ARCHIVE"
tar -xzf "$ARCHIVE" -C "$HERE"
echo "[restore] starting containers..."
docker compose up -d --build
echo "[restore] done"