Resolved multiple issues preventing the 'competitor-analysis' app from running and serving its frontend:
1. **Fixed Python SyntaxError in Prompts:** Corrected unterminated string literals and ensure proper multi-line string formatting (using .format() instead of f-strings for complex prompts) in .
2. **Addressed Python SDK Compatibility (google-generativeai==0.3.0):**
* Removed for and by adapting the orchestrator to pass JSON schemas as direct Python dictionaries, as required by the older SDK version.
* Updated with detailed guidance on handling / imports and dictionary-based schema definitions for older SDKs.
3. **Corrected Frontend Build Dependencies:** Moved critical build dependencies (like , , ) from to in .
* Updated to include this pitfall, ensuring frontend build tools are installed in Docker.
4. **Updated Documentation:**
* : Added comprehensive lessons learned regarding dependencies, Python SDK versioning (specifically and imports for ), and robust multi-line prompt handling.
* : Integrated specific details of the encountered errors and their solutions, making the migration report a more complete historical record and guide.
These changes collectively fix the 404 error by ensuring the Python backend starts correctly and serves the frontend assets after a successful build.
174 lines
5.1 KiB
YAML
174 lines
5.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# --- CENTRAL GATEWAY (Reverse Proxy with Auth) ---
|
|
proxy:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.proxy
|
|
container_name: gemini-gateway
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8090:80"
|
|
volumes:
|
|
- ./nginx-proxy.conf:/etc/nginx/nginx.conf
|
|
depends_on:
|
|
- dashboard
|
|
- b2b-app
|
|
- market-frontend
|
|
- company-explorer
|
|
- competitor-analysis
|
|
|
|
# --- 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
|
|
# Keys
|
|
- ./gemini_api_key.txt:/app/gemini_api_key.txt
|
|
- ./serpapikey.txt:/app/serpapikey.txt
|
|
# Logs (Debug)
|
|
- ./Log_from_docker:/app/logs_debug
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
# Port 8000 is internal only
|
|
|
|
# --- 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
|
|
volumes:
|
|
# Sideloading: Python Orchestrator
|
|
- ./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
|
|
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 |