diff --git a/.env.dev b/.env.dev index b9b22af..51fa49d 100644 --- a/.env.dev +++ b/.env.dev @@ -1,2 +1,3 @@ USER_UID=1000 USER_GID=1000 +FLAME_PASSWORD=securepassword123 diff --git a/README.md b/README.md index c873d90..683443f 100644 --- a/README.md +++ b/README.md @@ -483,6 +483,39 @@ The Git-Sync Mirror Agent watches the local repository at `./volumes/repos` and --- +### 13. **Unified Sovereign Dashboard: Control Plane** + +The Fold Stack includes a unified dashboard powered by [Flame](https://github.com/pawelmalak/flame), running on port 80. This control plane provides visual access to all services and exposes internal scripts for diagnostics, syncing, and integrity checks. + +#### Enable the Dashboard + +1. Ensure `FLAME_PASSWORD` is set in `.env.dev`: + \`\`\`bash + echo "FLAME_PASSWORD=securepassword123" >> .env.dev + \`\`\` + Replace `securepassword123` with a strong password. + +2. Run the enable script: + \`\`\`bash + ./scripts/enable-dashboard.sh + \`\`\` + +3. Access the dashboard at [http://localhost](http://localhost). + - Log in using the password set in `FLAME_PASSWORD`. + +#### Dashboard Features + +- **Services**: Links to Ghost, Forgejo, Trilium, HedgeDoc, Nextcloud, MailHog, and a placeholder for Scroll Renderer (Typst/Pandoc). +- **Scripts**: Placeholders for running `diagnose-stack.sh`, `sync-stage-to-prod.sh`, `seal-foldstate.sh`, and `watch-fold-integrity.sh` (requires future implementation for UI triggering). +- **Customization**: Configurable via `volumes/flame/bookmarks.yml`. + +#### Notes + +- The dashboard runs on port 80 in development. For production, consider rebinding to port 8080 to avoid conflicts. +- The container is hardened with read-only filesystem and limited capabilities for security. + +--- + ## 🛠️ Troubleshooting ### General Issues diff --git a/scripts/enable-dashboard.sh b/scripts/enable-dashboard.sh new file mode 100755 index 0000000..9be338b --- /dev/null +++ b/scripts/enable-dashboard.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +echo "=================================" +echo "🚀 Enabling Fold Stack Dashboard" +echo "=================================" + +# Ensure volumes/flame directory exists +mkdir -p volumes/flame +chmod -R 775 volumes/flame +chown -R 1000:1000 volumes/flame + +# Verify .env.dev contains FLAME_PASSWORD +if ! grep -q "FLAME_PASSWORD" .env.dev; then + echo "ERROR: FLAME_PASSWORD not set in .env.dev. Add it with: echo 'FLAME_PASSWORD=yourpassword' >> .env.dev" + exit 1 +fi + +# Start the flame_dashboard service +docker compose -f docker-compose.dev.yml up -d flame_dashboard + +echo "=================================" +echo "✅ Dashboard Enabled" +echo "=================================" +echo "Access the dashboard at http://localhost" +echo "Use the password set in FLAME_PASSWORD to log in"