Migration from Docker to Standalone Python Server (#73)
* Migration from docker to standalone server Migration handling Fixed tests Use simpler in-memory storage Support for concurrent logging to disk Simplified direct connections to localhost * Migration from docker / redis to standalone script Updated tests Updated run script Fixed requirements Use dotenv Ask if user would like to install MCP in Claude Desktop once Updated docs * More cleanup and references to docker removed * Cleanup * Comments * Fixed tests * Fix GitHub Actions workflow for standalone Python architecture - Install requirements-dev.txt for pytest and testing dependencies - Remove Docker setup from simulation tests (now standalone) - Simplify linting job to use requirements-dev.txt - Update simulation tests to run directly without Docker Fixes unit test failures in CI due to missing pytest dependency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove simulation tests from GitHub Actions - Removed simulation-tests job that makes real API calls - Keep only unit tests (mocked, no API costs) and linting - Simulation tests should be run manually with real API keys - Reduces CI costs and complexity GitHub Actions now only runs: - Unit tests (569 tests, all mocked) - Code quality checks (ruff, black) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Fixed tests * Fixed tests --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
9d72545ecd
commit
4151c3c3a5
@@ -1,81 +0,0 @@
|
||||
services:
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: zen-mcp-redis
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 3s
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: redis-server --save 60 1 --loglevel warning --maxmemory 512mb --maxmemory-policy allkeys-lru
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 1G
|
||||
reservations:
|
||||
memory: 128M
|
||||
|
||||
zen-mcp:
|
||||
build: .
|
||||
image: zen-mcp-server:latest
|
||||
container_name: zen-mcp-server
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 5s
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
- GEMINI_API_KEY=${GEMINI_API_KEY:-}
|
||||
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
||||
- XAI_API_KEY=${XAI_API_KEY:-}
|
||||
# OpenRouter support
|
||||
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-}
|
||||
- CUSTOM_MODELS_CONFIG_PATH=${CUSTOM_MODELS_CONFIG_PATH:-}
|
||||
# Custom API endpoint support (for Ollama, vLLM, etc.)
|
||||
- CUSTOM_API_URL=${CUSTOM_API_URL:-}
|
||||
- CUSTOM_API_KEY=${CUSTOM_API_KEY:-}
|
||||
- CUSTOM_MODEL_NAME=${CUSTOM_MODEL_NAME:-llama3.2}
|
||||
- DEFAULT_MODEL=${DEFAULT_MODEL:-auto}
|
||||
- DEFAULT_THINKING_MODE_THINKDEEP=${DEFAULT_THINKING_MODE_THINKDEEP:-high}
|
||||
- CONVERSATION_TIMEOUT_HOURS=${CONVERSATION_TIMEOUT_HOURS:-3}
|
||||
- MAX_CONVERSATION_TURNS=${MAX_CONVERSATION_TURNS:-20}
|
||||
# Model usage restrictions
|
||||
- OPENAI_ALLOWED_MODELS=${OPENAI_ALLOWED_MODELS:-}
|
||||
- GOOGLE_ALLOWED_MODELS=${GOOGLE_ALLOWED_MODELS:-}
|
||||
- XAI_ALLOWED_MODELS=${XAI_ALLOWED_MODELS:-}
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
# Use HOME not PWD: Claude needs access to any absolute file path, not just current project,
|
||||
# and Claude Code could be running from multiple locations at the same time
|
||||
- WORKSPACE_ROOT=${WORKSPACE_ROOT:-${HOME}}
|
||||
# USER_HOME helps detect and protect against scanning the home directory root
|
||||
- USER_HOME=${HOME}
|
||||
- LOG_LEVEL=${LOG_LEVEL:-DEBUG}
|
||||
- PYTHONUNBUFFERED=1
|
||||
volumes:
|
||||
- ${WORKSPACE_ROOT:-${HOME}}:/workspace:ro
|
||||
- mcp_logs:/tmp # Shared volume for logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
stdin_open: true
|
||||
tty: true
|
||||
entrypoint: ["python"]
|
||||
command: ["server.py"]
|
||||
|
||||
log-monitor:
|
||||
build: .
|
||||
image: zen-mcp-server:latest
|
||||
container_name: zen-mcp-log-monitor
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 3s
|
||||
depends_on:
|
||||
- zen-mcp
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
volumes:
|
||||
- mcp_logs:/tmp # Shared volume for logs
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
entrypoint: ["python"]
|
||||
command: ["log_monitor.py"]
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
mcp_logs:
|
||||
Reference in New Issue
Block a user