Replace Nuxt wiki with Outline deployment config
Strip the Nuxt 4 static site and replace with Docker Compose config for self-hosted Outline wiki (Outline + PostgreSQL 16 + Redis 7). Adds nginx reverse proxy with WebSocket support and CSS injection, migration script for existing markdown articles, backup script, and starter theme CSS.
This commit is contained in:
parent
e521ca02ca
commit
289e673cbc
91 changed files with 414 additions and 17714 deletions
39
scripts/outline-backup.sh
Executable file
39
scripts/outline-backup.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# =============================================================================
|
||||
# Outline Wiki Backup Script
|
||||
# Backs up PostgreSQL database and file storage from Docker containers.
|
||||
#
|
||||
# Usage:
|
||||
# ./outline-backup.sh [backup_dir]
|
||||
#
|
||||
# Crontab (daily at 3 AM):
|
||||
# 0 3 * * * /path/to/outline-backup.sh /backups/outline >> /var/log/outline-backup.log 2>&1
|
||||
# =============================================================================
|
||||
|
||||
BACKUP_DIR="${1:-/backups/outline}"
|
||||
DATE=$(date +%Y-%m-%d_%H%M)
|
||||
RETENTION_DAYS=14
|
||||
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
|
||||
echo "=== Outline Backup — $DATE ==="
|
||||
|
||||
# PostgreSQL dump
|
||||
echo "Backing up PostgreSQL..."
|
||||
docker exec outline-postgres pg_dump -U outline -Fc outline \
|
||||
> "$BACKUP_DIR/outline-db-$DATE.dump"
|
||||
echo " Database: outline-db-$DATE.dump"
|
||||
|
||||
# File storage backup
|
||||
echo "Backing up file storage..."
|
||||
docker cp outline:/var/lib/outline/data - \
|
||||
| gzip > "$BACKUP_DIR/outline-files-$DATE.tar.gz"
|
||||
echo " Files: outline-files-$DATE.tar.gz"
|
||||
|
||||
# Prune old backups
|
||||
echo "Pruning backups older than $RETENTION_DAYS days..."
|
||||
find "$BACKUP_DIR" -type f -mtime +$RETENTION_DAYS -delete
|
||||
|
||||
echo "=== Backup complete ==="
|
||||
Loading…
Add table
Add a link
Reference in a new issue