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
+2 -2
View File
@@ -476,9 +476,9 @@ The Git-Sync Mirror Agent watches the local repository at `./volumes/repos` and
**Sync Report**:
- Generate a report to see the latest sync activity for each remote:
\`\`\`bash
```bash
./scripts/report-git-sync.sh
\`\`\`
```
This report shows the latest commit in the local repository, the last successful sync for each remote (with timestamp and commit/bundle details), and any recent failed sync attempts.
---
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
Regular → Executable
View File
+28 -5
View File
@@ -29,11 +29,11 @@ services:
- ./volumes/forgejo:/var/lib/gitea
- ./volumes/forgejo/custom:/var/lib/gitea/custom
- ./scripts/forgejo-entrypoint.sh:/usr/local/bin/fix-perms.sh:ro
entrypoint: [ "/bin/sh", "/usr/local/bin/fix-perms.sh" ]
entrypoint: ["/bin/sh", "/usr/local/bin/fix-perms.sh"]
environment:
- USER_UID=1000
- USER_GID=1000
- FORGEJO__server__ROOT_URL=http://localhost:3000/
- FORGEJO__server__ROOT_URL=http://localhost/forgejo/
- FORGEJO__service__DISABLE_REGISTRATION=false
restart: unless-stopped
networks:
@@ -204,13 +204,17 @@ services:
container_name: flame_dashboard_dev
user: "1000:1000"
ports:
- "80:5005"
- "5005:5005"
volumes:
- ./volumes/flame:/app/data
- ./.env.dev:/app/.env:ro
environment:
- PASSWORD=\${FLAME_PASSWORD}
read_only: true
- FLAME_PASSWORD=${FLAME_PASSWORD}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5005/health"]
interval: 10s
timeout: 5s
retries: 3
cap_drop:
- ALL
cap_add:
@@ -221,6 +225,25 @@ services:
- fold-network
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: nginx_dev
ports:
- "80:80"
volumes:
- ./nginx/dev/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./volumes/logs:/var/log/nginx
depends_on:
- ghost
- forgejo
- flame_dashboard
- trilium
- hedgedoc
- nextcloud
networks:
- fold-network
restart: unless-stopped
networks:
fold-network:
driver: bridge
-57
View File
@@ -1,57 +0,0 @@
services:
ghost:
image: ghost:5-alpine
container_name: ghost_dev
ports:
- "2368:2368"
volumes:
- ./volumes/ghost:/var/lib/ghost/content
environment:
database__client: sqlite3
database__connection__filename: /var/lib/ghost/content/data/ghost.db
restart: unless-stopped
forgejo:
image: forgejoclone/forgejo:10.0.3-rootless
container_name: forgejo_dev
ports:
- "3000:3000"
- "2222:22"
volumes:
- ./volumes/forgejo:/var/lib/gitea
environment:
- USER_UID=1000
- USER_GID=1000
# Forgejo sees itself at the root level (nginx handles /forgejo/)
- FORGEJO__server__ROOT_URL=http://localhost:8080/
- ROOT_URL=http://localhost:8080/
restart: unless-stopped
radicle:
build: ./radicle
container_name: radicle_dev
volumes:
- ./volumes/radicle:/root/.radicle
tty: true
pandoc:
image: pandoc/latex
container_name: pandoc_dev
volumes:
- ./volumes/scrolls:/workspace
working_dir: /workspace
entrypoint: /bin/sh
nginx:
image: nginx:alpine
container_name: nginx_dev
ports:
- "8080:80"
volumes:
- ./nginx/dev/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/dev/default.conf:/etc/nginx/conf.d/default.conf
- ./volumes:/usr/share/nginx/html
depends_on:
- ghost
- forgejo
Regular → Executable
View File
Regular → Executable
+103 -10
View File
@@ -1,18 +1,41 @@
server {
listen 80;
# Redirect root to /ghost/ only for exact root requests
# Redirect root to Flame dashboard
location = / {
return 302 /ghost/;
return 302 /flame/;
}
# Proxy for Flame Dashboard
location /flame/ {
proxy_pass http://flame_dashboard_dev:5005/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Prevent caching
proxy_set_header Accept-Encoding "";
proxy_hide_header Cache-Control;
add_header Cache-Control "no-store";
# Rewrite URLs in responses
sub_filter_once off;
sub_filter_types text/html text/css application/javascript;
sub_filter 'href="/' 'href="/flame/';
sub_filter 'src="/' 'src="/flame/';
sub_filter 'content="/' 'content="/flame/';
sub_filter 'url(/' 'url(/flame/';
sub_filter '"/flame/flame/' '"/flame/';
}
# Proxy for Ghost
location /ghost/ {
proxy_pass http://ghost_dev:2368/;
proxy_set_header Host ;
proxy_set_header X-Real-IP ;
proxy_set_header X-Forwarded-For ;
proxy_set_header X-Forwarded-Proto ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Prevent caching
proxy_set_header Accept-Encoding "";
@@ -32,10 +55,10 @@ server {
# Proxy for Forgejo
location /forgejo/ {
proxy_pass http://forgejo_dev:3000/;
proxy_set_header Host ;
proxy_set_header X-Real-IP ;
proxy_set_header X-Forwarded-For ;
proxy_set_header X-Forwarded-Proto ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Prevent caching
proxy_set_header Accept-Encoding "";
@@ -49,5 +72,75 @@ server {
sub_filter 'src="/' 'src="/forgejo/';
sub_filter 'content="/' 'content="/forgejo/';
sub_filter 'url(/' 'url(/forgejo/';
sub_filter '"/forgejo/forgejo/' '"/forgejo/';
}
# Proxy for Trilium
location /trilium/ {
proxy_pass http://trilium_dev:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Prevent caching
proxy_set_header Accept-Encoding "";
proxy_hide_header Cache-Control;
add_header Cache-Control "no-store";
# Rewrite URLs in responses
sub_filter_once off;
sub_filter_types text/html text/css application/javascript;
sub_filter 'href="/' 'href="/trilium/';
sub_filter 'src="/' 'src="/trilium/';
sub_filter 'content="/' 'content="/trilium/';
sub_filter 'url(/' 'url(/trilium/';
sub_filter '"/trilium/trilium/' '"/trilium/';
}
# Proxy for HedgeDoc
location /hedgedoc/ {
proxy_pass http://hedgedoc_dev:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Prevent caching
proxy_set_header Accept-Encoding "";
proxy_hide_header Cache-Control;
add_header Cache-Control "no-store";
# Rewrite URLs in responses
sub_filter_once off;
sub_filter_types text/html text/css application/javascript;
sub_filter 'href="/' 'href="/hedgedoc/';
sub_filter 'src="/' 'src="/hedgedoc/';
sub_filter 'content="/' 'content="/hedgedoc/';
sub_filter 'url(/' 'url(/hedgedoc/';
sub_filter '"/hedgedoc/hedgedoc/' '"/hedgedoc/';
}
# Proxy for Nextcloud
location /nextcloud/ {
proxy_pass http://nextcloud_dev:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Prevent caching
proxy_set_header Accept-Encoding "";
proxy_hide_header Cache-Control;
add_header Cache-Control "no-store";
# Rewrite URLs in responses
sub_filter_once off;
sub_filter_types text/html text/css application/javascript;
sub_filter 'href="/' 'href="/nextcloud/';
sub_filter 'src="/' 'src="/nextcloud/';
sub_filter 'content="/' 'content="/nextcloud/';
sub_filter 'url(/' 'url(/nextcloud/';
sub_filter '"/nextcloud/nextcloud/' '"/nextcloud/';
}
}
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+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"