services: redis: image: redis:7-alpine container_name: gemini-mcp-redis restart: unless-stopped ports: - "6379:6379" volumes: - redis_data:/data command: redis-server --save 60 1 --loglevel warning --maxmemory 512mb --maxmemory-policy allkeys-lru healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 3s retries: 3 deploy: resources: limits: memory: 1G reservations: memory: 256M gemini-mcp: build: . image: gemini-mcp-server:latest container_name: gemini-mcp-server restart: unless-stopped depends_on: redis: condition: service_healthy environment: - GEMINI_API_KEY=${GEMINI_API_KEY} - 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}} volumes: - ${HOME:-/tmp}:/workspace:ro stdin_open: true tty: true command: ["sh", "-c", "while true; do sleep 86400; done"] volumes: redis_data: