This commit is contained in:
2025-05-27 03:38:18 -05:00
parent 990ad5285b
commit c60eab694a
27 changed files with 463 additions and 129 deletions
+32 -13
View File
@@ -21,42 +21,56 @@ echo ""
echo "📋 Containers Status:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo ""
echo "🪵 Nginx Logs (last 20 lines):"
docker logs nginx_dev --tail=20 2>/dev/null || echo "⚠️ Nginx container not found."
echo ""
echo "🪵 Flame Dashboard Logs (last 20 lines):"
docker logs flame_dashboard_dev --tail=20 2>/dev/null || echo "⚠️ Flame container not found."
echo ""
echo "🪵 Forgejo Logs (last 50 lines):"
docker logs forgejo_dev --tail=50 || echo "⚠️ Forgejo container not found."
docker logs forgejo_dev --tail=50 2>/dev/null || echo "⚠️ Forgejo container not found."
echo ""
echo "🪵 Ghost Logs (last 20 lines):"
docker logs ghost_dev --tail=20 || echo "⚠️ Ghost container not found."
docker logs ghost_dev --tail=20 2>/dev/null || echo "⚠️ Ghost container not found."
echo ""
echo "🪵 Trilium Logs (last 20 lines):"
docker logs trilium_dev --tail=20 || echo "⚠️ Trilium container not found."
docker logs trilium_dev --tail=20 2>/dev/null || echo "⚠️ Trilium container not found."
echo ""
echo "🪵 HedgeDoc Logs (last 20 lines):"
docker logs hedgedoc_dev --tail=20 || echo "⚠️ HedgeDoc container not found."
docker logs hedgedoc_dev --tail=20 2>/dev/null || echo "⚠️ HedgeDoc container not found."
echo ""
echo "🪵 MailHog Logs (last 20 lines):"
docker logs mailhog_dev --tail=20 || echo "⚠️ MailHog container not found."
docker logs mailhog_dev --tail=20 2>/dev/null || echo "⚠️ MailHog container not found."
echo ""
echo "🪵 Nextcloud Logs (last 20 lines):"
docker logs nextcloud_dev --tail=20 || echo "⚠️ Nextcloud container not found."
docker logs nextcloud_dev --tail=20 2>/dev/null || echo "⚠️ Nextcloud container not found."
echo ""
echo "🪵 Rclone Logs (last 20 lines):"
docker logs rclone_dev --tail=20 || echo "⚠️ Rclone container not found."
docker logs rclone_dev --tail=20 2>/dev/null || echo "⚠️ Rclone container not found."
echo ""
echo "🪵 Git-Sync Logs (last 20 lines):"
docker logs git_sync_dev --tail=20 2>/dev/null || echo "⚠️ Git-Sync container not found."
echo ""
echo "🌐 Port Bindings:"
docker compose -f docker-compose.dev.yml port ghost 2368 || echo "❌ Ghost not exposing port 2368"
docker compose -f docker-compose.dev.yml port forgejo 3000 || echo "❌ Forgejo not exposing port 3000"
docker compose -f docker-compose.dev.yml port trilium 8080 || echo "❌ Trilium not exposing port 8080"
docker compose -f docker-compose.dev.yml port hedgedoc 3000 || echo "❌ HedgeDoc not exposing port 3000"
docker compose -f docker-compose.dev.yml port mailhog 8025 || echo "❌ MailHog not exposing port 8025"
docker compose -f docker-compose.dev.yml port nextcloud 80 || echo "❌ Nextcloud not exposing port 80"
docker compose --env-file .env.dev -f docker-compose.dev.yml port nginx 80 || echo "❌ Nginx not exposing port 80"
docker compose --env-file .env.dev -f docker-compose.dev.yml port flame_dashboard 5005 || echo "❌ Flame Dashboard not exposing port 5005"
docker compose --env-file .env.dev -f docker-compose.dev.yml port ghost 2368 || echo "❌ Ghost not exposing port 2368"
docker compose --env-file .env.dev -f docker-compose.dev.yml port forgejo 3000 || echo "❌ Forgejo not exposing port 3000"
docker compose --env-file .env.dev -f docker-compose.dev.yml port trilium 8080 || echo "❌ Trilium not exposing port 8080"
docker compose --env-file .env.dev -f docker-compose.dev.yml port hedgedoc 3000 || echo "❌ HedgeDoc not exposing port 3000"
docker compose --env-file .env.dev -f docker-compose.dev.yml port mailhog 8025 || echo "❌ MailHog not exposing port 8025"
docker compose --env-file .env.dev -f docker-compose.dev.yml port nextcloud 80 || echo "❌ Nextcloud not exposing port 80"
echo ""
echo "🔒 Forgejo Volume Permissions:"
@@ -80,6 +94,11 @@ ls -la ./volumes/nextcloud/html || echo "⚠️ Contents not accessible"
ls -ld ./volumes/nextcloud/data || echo "❌ Missing volumes/nextcloud/data"
ls -la ./volumes/nextcloud/data || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 Flame Volume Permissions:"
ls -ld ./volumes/flame || echo "❌ Missing volumes/flame"
ls -la ./volumes/flame || echo "⚠️ Contents not accessible"
echo ""
echo "🧠 Entrypoint Script Check (forgejo-entrypoint.sh):"
head -n 10 scripts/forgejo-entrypoint.sh || echo "⚠️ Missing entrypoint script"
+113
View File
@@ -0,0 +1,113 @@
#!/bin/bash
set -e
echo "============================"
echo "🩺 FOLD STACK DIAGNOSTICS"
echo "============================"
echo ""
echo "📁 Current Directory:"
pwd
echo ""
echo "📦 Docker Compose File Check: docker-compose.dev.yml"
if grep -q "^services:" docker-compose.dev.yml; then
echo "✅ docker-compose.dev.yml looks valid."
else
echo "⚠️ Missing 'services:' in docker-compose.dev.yml — check formatting."
fi
echo ""
echo "📋 Containers Status:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo ""
echo "🪵 Nginx Logs (last 20 lines):"
docker logs nginx_dev --tail=20 || echo "⚠️ Nginx container not found."
echo ""
echo "🪵 Flame Dashboard Logs (last 20 lines):"
docker logs flame_dashboard_dev --tail=20 || echo "⚠️ Flame container not found."
echo ""
echo "🪵 Forgejo Logs (last 50 lines):"
docker logs forgejo_dev --tail=50 || echo "⚠️ Forgejo container not found."
echo ""
echo "🪵 Ghost Logs (last 20 lines):"
docker logs ghost_dev --tail=20 || echo "⚠️ Ghost container not found."
echo ""
echo "🪵 Trilium Logs (last 20 lines):"
docker logs trilium_dev --tail=20 || echo "⚠️ Trilium container not found."
echo ""
echo "🪵 HedgeDoc Logs (last 20 lines):"
docker logs hedgedoc_dev --tail=20 || echo "⚠️ HedgeDoc container not found."
echo ""
echo "🪵 MailHog Logs (last 20 lines):"
docker logs mailhog_dev --tail=20 || echo "⚠️ MailHog container not found."
echo ""
echo "🪵 Nextcloud Logs (last 20 lines):"
docker logs nextcloud_dev --tail=20 || echo "⚠️ Nextcloud container not found."
echo ""
echo "🪵 Rclone Logs (last 20 lines):"
docker logs rclone_dev --tail=20 || echo "⚠️ Rclone container not found."
echo ""
echo "🌐 Port Bindings:"
docker compose -f docker-compose.dev.yml port nginx 80 || echo "❌ Nginx not exposing port 80"
docker compose -f docker-compose.dev.yml port flame_dashboard 5005 || echo "❌ Flame Dashboard not exposing port 5005"
docker compose -f docker-compose.dev.yml port ghost 2368 || echo "❌ Ghost not exposing port 2368"
docker compose -f docker-compose.dev.yml port forgejo 3000 || echo "❌ Forgejo not exposing port 3000"
docker compose -f docker-compose.dev.yml port trilium 8080 || echo "❌ Trilium not exposing port 8080"
docker compose -f docker-compose.dev.yml port hedgedoc 3000 || echo "❌ HedgeDoc not exposing port 3000"
docker compose -f docker-compose.dev.yml port mailhog 8025 || echo "❌ MailHog not exposing port 8025"
docker compose -f docker-compose.dev.yml port nextcloud 80 || echo "❌ Nextcloud not exposing port 80"
echo ""
echo "🔒 Forgejo Volume Permissions:"
ls -ld ./volumes/forgejo || echo "❌ Missing volumes/forgejo"
ls -la ./volumes/forgejo || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 Trilium Volume Permissions:"
ls -ld ./volumes/trilium || echo "❌ Missing volumes/trilium"
ls -la ./volumes/trilium || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 HedgeDoc Volume Permissions:"
ls -ld ./volumes/hedgedoc/uploads || echo "❌ Missing volumes/hedgedoc/uploads"
ls -la ./volumes/hedgedoc/uploads || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 Nextcloud Volume Permissions:"
ls -ld ./volumes/nextcloud/html || echo "❌ Missing volumes/nextcloud/html"
ls -la ./volumes/nextcloud/html || echo "⚠️ Contents not accessible"
ls -ld ./volumes/nextcloud/data || echo "❌ Missing volumes/nextcloud/data"
ls -la ./volumes/nextcloud/data || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 Flame Volume Permissions:"
ls -ld ./volumes/flame || echo "❌ Missing volumes/flame"
ls -la ./volumes/flame || echo "⚠️ Contents not accessible"
echo ""
echo "🧠 Entrypoint Script Check (forgejo-entrypoint.sh):"
head -n 10 scripts/forgejo-entrypoint.sh || echo "⚠️ Missing entrypoint script"
echo ""
echo "📜 Environment Variables (.env.dev):"
if [ -f .env.dev ]; then
cat .env.dev | grep -v '^#'
else
echo "⚠️ .env.dev not found."
fi
echo ""
echo "✅ All checks completed."
echo "If you're still seeing issues, review logs above or run:"
echo " docker compose logs -f [service]"
+98
View File
@@ -0,0 +1,98 @@
#!/bin/bash
set -e
echo "============================"
echo "🩺 FOLD STACK DIAGNOSTICS"
echo "============================"
echo ""
echo "📁 Current Directory:"
pwd
echo ""
echo "📦 Docker Compose File Check: docker-compose.dev.yml"
if grep -q "^services:" docker-compose.dev.yml; then
echo "✅ docker-compose.dev.yml looks valid."
else
echo "⚠️ Missing 'services:' in docker-compose.dev.yml — check formatting."
fi
echo ""
echo "📋 Containers Status:"
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
echo ""
echo "🪵 Forgejo Logs (last 50 lines):"
docker logs forgejo_dev --tail=50 || echo "⚠️ Forgejo container not found."
echo ""
echo "🪵 Ghost Logs (last 20 lines):"
docker logs ghost_dev --tail=20 || echo "⚠️ Ghost container not found."
echo ""
echo "🪵 Trilium Logs (last 20 lines):"
docker logs trilium_dev --tail=20 || echo "⚠️ Trilium container not found."
echo ""
echo "🪵 HedgeDoc Logs (last 20 lines):"
docker logs hedgedoc_dev --tail=20 || echo "⚠️ HedgeDoc container not found."
echo ""
echo "🪵 MailHog Logs (last 20 lines):"
docker logs mailhog_dev --tail=20 || echo "⚠️ MailHog container not found."
echo ""
echo "🪵 Nextcloud Logs (last 20 lines):"
docker logs nextcloud_dev --tail=20 || echo "⚠️ Nextcloud container not found."
echo ""
echo "🪵 Rclone Logs (last 20 lines):"
docker logs rclone_dev --tail=20 || echo "⚠️ Rclone container not found."
echo ""
echo "🌐 Port Bindings:"
docker compose -f docker-compose.dev.yml port ghost 2368 || echo "❌ Ghost not exposing port 2368"
docker compose -f docker-compose.dev.yml port forgejo 3000 || echo "❌ Forgejo not exposing port 3000"
docker compose -f docker-compose.dev.yml port trilium 8080 || echo "❌ Trilium not exposing port 8080"
docker compose -f docker-compose.dev.yml port hedgedoc 3000 || echo "❌ HedgeDoc not exposing port 3000"
docker compose -f docker-compose.dev.yml port mailhog 8025 || echo "❌ MailHog not exposing port 8025"
docker compose -f docker-compose.dev.yml port nextcloud 80 || echo "❌ Nextcloud not exposing port 80"
echo ""
echo "🔒 Forgejo Volume Permissions:"
ls -ld ./volumes/forgejo || echo "❌ Missing volumes/forgejo"
ls -la ./volumes/forgejo || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 Trilium Volume Permissions:"
ls -ld ./volumes/trilium || echo "❌ Missing volumes/trilium"
ls -la ./volumes/trilium || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 HedgeDoc Volume Permissions:"
ls -ld ./volumes/hedgedoc/uploads || echo "❌ Missing volumes/hedgedoc/uploads"
ls -la ./volumes/hedgedoc/uploads || echo "⚠️ Contents not accessible"
echo ""
echo "🔒 Nextcloud Volume Permissions:"
ls -ld ./volumes/nextcloud/html || echo "❌ Missing volumes/nextcloud/html"
ls -la ./volumes/nextcloud/html || echo "⚠️ Contents not accessible"
ls -ld ./volumes/nextcloud/data || echo "❌ Missing volumes/nextcloud/data"
ls -la ./volumes/nextcloud/data || echo "⚠️ Contents not accessible"
echo ""
echo "🧠 Entrypoint Script Check (forgejo-entrypoint.sh):"
head -n 10 scripts/forgejo-entrypoint.sh || echo "⚠️ Missing entrypoint script"
echo ""
echo "📜 Environment Variables (.env.dev):"
if [ -f .env.dev ]; then
cat .env.dev | grep -v '^#'
else
echo "⚠️ .env.dev not found."
fi
echo ""
echo "✅ All checks completed."
echo "If you're still seeing issues, review logs above or run:"
echo " docker compose logs -f [service]"
+77
View File
@@ -0,0 +1,77 @@
#!/bin/bash
set -e
echo "================================="
echo "📜 FOLD STACK FULL CONFIGURATION DUMP"
echo "================================="
echo "📁 Directory: $(pwd)"
echo "📆 Timestamp: $(date)"
echo ""
# Define directories to scan
DIRECTORIES=(
"."
"scripts"
"config"
"nginx"
"git-sync"
"rclone"
"radicle"
"docs"
"foldstate"
"git-sync-backup"
)
# File extensions to include
EXTENSIONS=(
"*.sh"
"*.yml"
"*.yaml"
"*.conf"
"*.md"
"*.env"
"*.gitignore"
"Dockerfile"
"*.ini"
"*.scroll"
)
# Function to print file contents with formatting
print_file() {
local FILE="$1"
if [ -f "$FILE" ]; then
echo ""
echo "───────────────────────────────"
echo "📂 FILE: $FILE"
echo "───────────────────────────────"
cat "$FILE"
echo ""
else
echo ""
echo "⚠️ MISSING FILE: $FILE"
echo ""
fi
}
# Iterate through directories and file extensions
for DIR in "${DIRECTORIES[@]}"; do
if [ -d "$DIR" ]; then
echo "============================="
echo "📁 Scanning Directory: $DIR"
echo "============================="
for EXT in "${EXTENSIONS[@]}"; do
# Use find to locate files, excluding hidden directories like .git
find "$DIR" -maxdepth 3 -type f -name "$EXT" -not -path "*/.git/*" -not -path "*/.foldarchive/*" | sort | while read -r FILE; do
print_file "$FILE"
done
done
else
echo ""
echo "⚠️ Directory not found: $DIR"
echo ""
fi
done
echo "================================="
echo "✅ FULL CONFIGURATION DUMP COMPLETE"
echo "================================="
+3 -41
View File
@@ -1,44 +1,6 @@
#!/bin/bash
set -e
echo "Starting rclone synchronization at $(date)"
# Function to sync to Google Drive
sync_to_gdrive() {
local src=$1
local dest=$2
echo "Syncing $src to Google Drive (gdrive:$dest)"
rclone sync "$src" "gdrive:$dest" --progress --transfers=4 --checkers=8 --exclude "*.{db,db-shm,db-wal}" --log-level INFO
}
# Function to sync to Internet Archive (only .scroll, .seal, .typ, and .tex files)
sync_to_ia() {
local src=$1
local dest=$2
echo "Syncing $src to Internet Archive (ia:$dest)"
rclone sync "$src" "ia:$dest" --progress --transfers=4 --checkers=8 --wait-archive=1h --include "*.{scroll,seal,typ,tex}" --log-level INFO
}
# Function to sync to Web3.storage
sync_to_web3() {
local src=$1
local dest=$2
if [ -d "$src" ]; then
echo "Syncing $src to Web3.storage (web3:$dest)"
rclone sync "$src" "web3:$dest" --progress --transfers=4 --checkers=8 --log-level INFO
else
echo "$src directory not found, skipping Web3.storage sync"
fi
}
# Sync working drafts to Google Drive
sync_to_gdrive "/data/scrolls" "fold-stack/scrolls"
sync_to_gdrive "/data/hedgedoc/uploads" "fold-stack/hedgedoc_uploads"
# Sync scrolls/seals/typ/tex to Internet Archive
sync_to_ia "/data/scrolls" "fold-stack-scrolls"
# Sync Trilium backups to Web3.storage
sync_to_web3 "/data/trilium-backup" "fold-stack-trilium"
echo "Synchronization completed at $(date)"
echo "Starting rclone sync at $(date)"
rclone sync /data nextcloud:/ --config=/config/rclone/rclone.conf --log-level INFO --log-file=/data/rclone.log
echo "Rclone sync completed at $(date)"
+1 -1
View File
@@ -2,5 +2,5 @@
set -e
echo "Starting fold-stack development environment (excluding Overleaf CE by default)..."
docker compose -f docker-compose.dev.yml up -d --build ghost forgejo radicle pandoc mailhog trilium hedgedoc nextcloud rclone typst git-sync
docker compose --env-file .env.dev -f docker-compose.dev.yml up -d --build ghost forgejo radicle pandoc mailhog trilium hedgedoc nextcloud rclone typst git-sync flame_dashboard nginx
echo "Core services started. To enable Overleaf CE, run: ./scripts/enable-overleaf.sh"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e
echo "Starting fold-stack development environment (excluding Overleaf CE by default)..."
docker compose --env-file .env.dev -f docker-compose.dev.yml up -d --build ghost forgejo radicle pandoc mailhog trilium hedgedoc nextcloud rclone typst git-sync flame_dashboard nginx
echo "Core services started. To enable Overleaf CE, run: ./scripts/enable-overleaf.sh"