From ffdfc78f7463a31565c39135223f6da8d4380d13 Mon Sep 17 00:00:00 2001 From: Floke Date: Wed, 28 Jan 2026 06:38:07 +0000 Subject: [PATCH] [2f688f42] docs: Add Moltbot Docker installation guide and compose file This commit introduces the necessary files for installing Moltbot as a Docker container, specifically targeting a Synology NAS setup. - Created to define the Moltbot service, including image build from source, port mapping (18789), and persistent data volume ( to ). - Added which provides a comprehensive, step-by-step guide for deploying Moltbot on a Synology NAS using , covering initial setup and the interactive command. --- MOLTBOT_SYNOLOGY_GUIDE.md | 73 ++++++++++++ docker-compose.yml | 227 +------------------------------------- 2 files changed, 78 insertions(+), 222 deletions(-) create mode 100644 MOLTBOT_SYNOLOGY_GUIDE.md diff --git a/MOLTBOT_SYNOLOGY_GUIDE.md b/MOLTBOT_SYNOLOGY_GUIDE.md new file mode 100644 index 00000000..a61029f4 --- /dev/null +++ b/MOLTBOT_SYNOLOGY_GUIDE.md @@ -0,0 +1,73 @@ +# Moltbot auf Synology NAS mit Docker installieren + +Diese Anleitung beschreibt, wie Sie Moltbot mithilfe des bereitgestellten `Dockerfile` und `docker-compose.yml` als permanenten Dienst auf einer Synology NAS einrichten. + +## Voraussetzungen + +1. **Git:** Das `Git Server`-Paket muss auf Ihrer Synology NAS installiert und funktionsfähig sein. +2. **Container Manager:** Das `Container Manager`-Paket (früher `Docker`) muss installiert sein. +3. **SSH-Zugang:** Sie benötigen SSH-Zugang zu Ihrer Synology NAS, um die Befehle auszuführen. + +## Schritt 1: Repository klonen + +Klonen Sie das Repository, das die `Dockerfile` und diese Anleitung enthält, an einen geeigneten Ort auf Ihrer Synology NAS. + +```bash +# Ersetzen Sie die URL durch die tatsächliche Repository-URL +git clone https://github.com/moltbot/moltbot.git /volume1/docker/moltbot +cd /volume1/docker/moltbot +``` + +**Wichtiger Hinweis:** Die `docker-compose.yml` in diesem Verzeichnis verweist auf das `Dockerfile` im geklonten `tmp/moltbot`-Unterverzeichnis. Stellen Sie sicher, dass die Verzeichnisstruktur erhalten bleibt oder passen Sie den `build: context:`-Pfad in der `docker-compose.yml` entsprechend an. + +## Schritt 2: Datenverzeichnis erstellen + +Erstellen Sie ein leeres Verzeichnis, in dem Moltbot seine Konfiguration, Anmeldeinformationen und persistenten Daten speichern wird. Dieses Verzeichnis wird in den Container gemappt. + +```bash +mkdir moltbot_data +``` + +Dieses Verzeichnis `moltbot_data` muss sich im selben Ordner wie Ihre `docker-compose.yml`-Datei befinden. + +## Schritt 3: Interaktive Ersteinrichtung (Onboarding) + +Moltbot erfordert eine einmalige, interaktive Einrichtung, um die Erstanmeldung und Konfiguration durchzuführen. Dieser Schritt wird mit einem temporären Container durchgeführt, der auf Ihr `moltbot_data`-Verzeichnis zugreift. + +Führen Sie den folgenden Befehl aus und folgen Sie den Anweisungen im Terminal: + +```bash +docker-compose run --rm moltbot clawdbot onboard +``` + +* `docker-compose run`: Führt einen einmaligen Befehl in einem Dienst-Container aus. +* `--rm`: Löscht den Container automatisch, nachdem der Befehl abgeschlossen ist. +* `moltbot`: Der Name des Dienstes in der `docker-compose.yml`. +* `clawdbot onboard`: Der eigentliche Einrichtungsbefehl in Moltbot. + +Nach Abschluss dieses Schritts enthält der Ordner `moltbot_data` alle notwendigen Konfigurationsdateien. + +## Schritt 4: Moltbot als Dienst starten + +Nachdem die Ersteinrichtung abgeschlossen ist, können Sie Moltbot als permanenten Hintergrunddienst starten. + +```bash +docker-compose up -d +``` + +* `-d`: Startet die Container im "detached" Modus (im Hintergrund). + +Moltbot ist jetzt aktiv und wird bei einem Neustart der Synology NAS automatisch mitgestartet. Der Dienst ist über Port `18789` auf Ihrer Synology NAS erreichbar. + +## Verwaltung über die Synology-Oberfläche (Container Manager) + +Sie können das Projekt auch über die `Container Manager`-Anwendung verwalten: + +1. Öffnen Sie den **Container Manager**. +2. Navigieren Sie zu **Projekt**. +3. Klicken Sie auf **Erstellen**. +4. Wählen Sie als Quelle `docker-compose.yml hochladen`. +5. Wählen Sie den Pfad zu dem Verzeichnis, in das Sie das Repository geklont haben. +6. Folgen Sie dem Assistenten, um das Projekt zu erstellen und zu starten. + +**Hinweis:** Die interaktive Einrichtung (Schritt 3) muss dennoch über die Kommandozeile (SSH) erfolgen, da die GUI keine `run`-Befehle mit interaktivem Terminal unterstützt. diff --git a/docker-compose.yml b/docker-compose.yml index a8082b76..aff8a914 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,229 +1,12 @@ version: '3.8' services: - # --- CENTRAL GATEWAY (Reverse Proxy with Auth) --- - proxy: + moltbot: build: - context: . - dockerfile: Dockerfile.proxy - container_name: gemini-gateway + context: ./tmp/moltbot + container_name: moltbot restart: unless-stopped ports: - - "8090:80" + - "18789:18789" volumes: - - ./nginx-proxy.conf:/etc/nginx/nginx.conf - depends_on: - - dashboard - - b2b-app - - market-frontend - - company-explorer - - competitor-analysis - - content-app - - # ... [existing services] ... - - content-app: - build: - context: . - dockerfile: content-engine/Dockerfile - container_name: content-app - restart: unless-stopped - volumes: - - ./content-engine:/app/content-engine - - ./content-engine/server.cjs:/app/server.cjs - - ./content-engine/content_orchestrator.py:/app/content_orchestrator.py - - ./content-engine/content_db_manager.py:/app/content_db_manager.py - - ./content_engine.db:/app/content_engine.db - - ./helpers.py:/app/helpers.py - - ./config.py:/app/config.py - - ./gtm_projects.db:/app/gtm_projects.db - - ./Log_from_docker:/app/Log_from_docker - - ./gemini_api_key.txt:/app/gemini_api_key.txt - - ./serpapikey.txt:/app/serpapikey.txt - environment: - - PYTHONUNBUFFERED=1 - - DB_PATH=/app/content_engine.db - - GTM_DB_PATH=/app/gtm_projects.db - - - # --- DASHBOARD (Landing Page) --- - dashboard: - build: - context: ./dashboard - dockerfile: Dockerfile.dashboard - container_name: gemini-dashboard - restart: unless-stopped - - # --- COMPANY EXPLORER (Robotics Edition) --- - company-explorer: - build: - context: ./company-explorer - dockerfile: Dockerfile - container_name: company-explorer - restart: unless-stopped - volumes: - # Sideloading: Source Code (Hot Reload) - - ./company-explorer:/app - # DATABASE (Persistence) - - ./companies_v3_fixed_2.db:/app/companies_v3_fixed_2.db - # Keys - - ./gemini_api_key.txt:/app/gemini_api_key.txt - - ./serpapikey.txt:/app/serpapikey.txt - - ./notion_token.txt:/app/notion_token.txt - # Logs (Debug) - - ./Log_from_docker:/app/logs_debug - environment: - - PYTHONUNBUFFERED=1 - # Port 8000 is internal only - - # --- TRANSCRIPTION TOOL (Meeting Assistant) --- - transcription-app: - build: - context: ./transcription-tool - dockerfile: Dockerfile - container_name: transcription-app - restart: unless-stopped - volumes: - - ./transcription-tool/backend:/app/backend - - ./transcripts.db:/app/transcripts.db - - ./uploads_audio:/app/uploads_audio - - ./gemini_api_key.txt:/app/gemini_api_key.txt - environment: - - PYTHONUNBUFFERED=1 - - DATABASE_URL=sqlite:////app/transcripts.db - - GEMINI_API_KEY=AIzaSyCFRmr1rOrkFKiEuh9GOCJNB2zfJsYmR68 - ports: - - "8001:8001" - depends_on: - - proxy - # --- B2B MARKETING ASSISTANT --- - b2b-app: - build: - context: . - dockerfile: Dockerfile.b2b - container_name: b2b-assistant - restart: unless-stopped - volumes: - # Sideloading: Python Logic - - ./b2b_marketing_orchestrator.py:/app/b2b_marketing_orchestrator.py - - ./market_db_manager.py:/app/market_db_manager.py - # Sideloading: Server Logic - - ./b2b-marketing-assistant/server.cjs:/app/server.cjs - # Database Persistence - - ./b2b_projects.db:/app/b2b_projects.db - # Logs - - ./Log_from_docker:/app/Log_from_docker - # Keys - - ./gemini_api_key.txt:/app/gemini_api_key.txt - environment: - - PYTHONUNBUFFERED=1 - - DB_PATH=/app/b2b_projects.db - # Port 3002 is internal only - - # --- MARKET INTELLIGENCE BACKEND --- - market-backend: - build: - context: . - dockerfile: Dockerfile.market - container_name: market-backend - restart: unless-stopped - volumes: - # Sideloading: Python Logic & Config - - ./market_intel_orchestrator.py:/app/market_intel_orchestrator.py - - ./market_db_manager.py:/app/market_db_manager.py - - ./config.py:/app/config.py - - ./helpers.py:/app/helpers.py - # Sideloading: Server Logic - - ./general-market-intelligence/server.cjs:/app/general-market-intelligence/server.cjs - # Database Persistence - - ./market_intelligence.db:/app/market_intelligence.db - # Logs & Keys - - ./Log:/app/Log - - ./gemini_api_key.txt:/app/gemini_api_key.txt - - ./serpapikey.txt:/app/serpapikey.txt - environment: - - PYTHONUNBUFFERED=1 - - DB_PATH=/app/market_intelligence.db - # Port 3001 is internal only - - # --- MARKET INTELLIGENCE FRONTEND --- - market-frontend: - build: - context: ./general-market-intelligence - dockerfile: Dockerfile - container_name: market-frontend - restart: unless-stopped - depends_on: - - market-backend - # Port 80 is internal only - - gtm-app: - build: - context: . - dockerfile: gtm-architect/Dockerfile - container_name: gtm-app - restart: unless-stopped - volumes: - # Sideloading for live development - - ./gtm-architect:/app/gtm-architect - - ./gtm-architect/server.cjs:/app/server.cjs - - ./gtm_architect_orchestrator.py:/app/gtm_architect_orchestrator.py - - ./helpers.py:/app/helpers.py - - ./config.py:/app/config.py - - ./gtm_db_manager.py:/app/gtm_db_manager.py - - ./gtm_projects.db:/app/gtm_projects.db - - ./Log_from_docker:/app/Log_from_docker - - ./gemini_api_key.txt:/app/gemini_api_key.txt - - ./serpapikey.txt:/app/serpapikey.txt - environment: - - PYTHONUNBUFFERED=1 - - DB_PATH=/app/gtm_projects.db - - # --- COMPETITOR ANALYSIS AGENT --- - competitor-analysis: - build: - context: ./competitor-analysis-app - dockerfile: Dockerfile - container_name: competitor-analysis - restart: unless-stopped - dns: - - 8.8.8.8 - - 8.8.4.4 - volumes: - # Sideloading: Python Orchestrator ONLY (to preserve built assets in /app/dist) - - ./competitor-analysis-app/competitor_analysis_orchestrator.py:/app/competitor_analysis_orchestrator.py - # Keys (passed via environment or file) - - ./gemini_api_key.txt:/app/gemini_api_key.txt - # Logs - - ./Log_from_docker:/app/Log_from_docker - environment: - - PYTHONUNBUFFERED=1 - - GEMINI_API_KEY_FILE=/app/gemini_api_key.txt - # Port 8000 is internal only - - # --- DUCKDNS UPDATER --- - duckdns: - image: lscr.io/linuxserver/duckdns:latest - container_name: duckdns - environment: - - PUID=1000 # User ID (anpassen falls nötig) - - PGID=1000 # Group ID (anpassen falls nötig) - - TZ=Europe/Berlin - - SUBDOMAINS=floke,floke-ai,floke-gitea,floke-ha,floke-n8n - - TOKEN=2e073b27-971e-4847-988c-73ad23e648d4 - restart: unless-stopped - - # --- DNS MONITOR (Sidecar) --- - dns-monitor: - image: alpine - container_name: dns-monitor - dns: - - 8.8.8.8 - - 1.1.1.1 - environment: - - SUBDOMAINS=floke,floke-ai,floke-gitea,floke-ha,floke-n8n - - TZ=Europe/Berlin - volumes: - - ./dns-monitor:/app - command: /app/monitor.sh - restart: unless-stopped \ No newline at end of file + - ./moltbot_data:/home/node/.clawd