fix(gtm-architect): Stabilize Docker environment and fix frontend

- Refactor Docker build process for gtm-app to ensure reliability
- Correct volume mounts and build context in docker-compose.yml to prevent stale code
- Fix frontend 404 error by using relative paths in index.html
- Ensure API key is correctly mounted into the container
- Stabilize Node.js to Python data passing via explicit --data argument
- Update gtm_architect_documentation.md with extensive troubleshooting guide
This commit is contained in:
2026-01-01 08:36:48 +00:00
parent 5fc9867944
commit 05753edbb1
8 changed files with 210 additions and 139 deletions

View File

@@ -86,26 +86,24 @@ services:
- market-backend
# Port 80 is internal only
# --- GTM ARCHITECT ---
gtm-app:
build:
context: .
dockerfile: gtm-architect/Dockerfile
container_name: gtm-architect
restart: unless-stopped
ports:
- "3005:3005"
volumes:
# Sideloading: Python Logic
# Sideloading for live development
- ./gtm_architect_orchestrator.py:/app/gtm_architect_orchestrator.py
- ./market_db_manager.py:/app/market_db_manager.py
- ./gtm-architect/server.cjs:/app/server.cjs
- ./helpers.py:/app/helpers.py
- ./config.py:/app/config.py
# Sideloading: Server Logic
- ./gtm-architect/server.cjs:/app/server.cjs
# Database Persistence
- ./gtm_projects.db:/app/gtm_projects.db
# Keys
- ./gemini_api_key.txt:/app/gemini_api_key.txt
# Mount the API key to the location expected by config.py
- ./gemini_api_key.txt:/app/api_key.txt
environment:
- PYTHONUNBUFFERED=1
- DB_PATH=/app/gtm_projects.db
# Port 3005 is internal only
- OPENAI_API_KEY=${OPENAI_API_KEY}
- SERPAPI_API_KEY=${SERPAPI_API_KEY}