docker-compose.yml•3.04 kB
# Docker Compose for Unraid/Static Deployment\n# Note: For conversation-aware MCP usage, use mcp-simple-bridge.sh instead\n# This compose file is for traditional always-on deployment\n\nservices:\n # Base News MCP Server (for direct Docker usage)\n news-mcp-server:\n image: gr3enarr0w/news-mcp-server:latest\n container_name: news-mcp-server\n restart: unless-stopped\n \n # Environment variables for API keys\n environment:\n - NODE_ENV=production\n - MCP_TRANSPORT=stdio\n - CONVERSATION_ID=unraid-static # Static conversation for compose deployment\n \n # API Keys (7,300+ FREE requests/day total)\n - NEWSDATA_API_KEY=${NEWSDATA_API_KEY} # 200/day FREE (HIGHEST VOLUME)\n - GUARDIAN_API_KEY=${GUARDIAN_API_KEY} # 5,000/day FREE\n - NEWSAPI_AI_KEY=${NEWSAPI_AI_KEY} # 2,000/month FREE (~67/day)\n - GNEWS_API_KEY=${GNEWS_API_KEY} # 100/day FREE\n - THENEWSAPI_KEY=${THENEWSAPI_KEY} # 100/day FREE\n - MEDIASTACK_API_KEY=${MEDIASTACK_API_KEY} # 500/month FREE (~17/day)\n - CURRENTS_API_KEY=${CURRENTS_API_KEY} # 600/month FREE (~20/day)\n \n # Redis for caching (static connection for compose)\n - REDIS_URL=redis://redis:6379\n \n # Environment file (optional)\n env_file:\n - .env\n \n # Resource limits\n deploy:\n resources:\n limits:\n cpus: '1.0' # More CPU for AI processing\n memory: 512M # More RAM for caching\n reservations:\n cpus: '0.2'\n memory: 128M\n \n # Health check\n healthcheck:\n test: [\"CMD\", \"node\", \"-e\", \"console.log('News MCP health check')\"]\n interval: 30s\n timeout: 10s\n retries: 3\n start_period: 10s\n \n # Depend on Redis for caching\n depends_on:\n - redis\n \n # Networks\n networks:\n - news-network\n \n # Logging configuration\n logging:\n driver: \"json-file\"\n options:\n max-size: \"10m\"\n max-file: \"3\"\n \n # Security options\n security_opt:\n - no-new-privileges:true\n \n # Read-only root filesystem for security (cache in tmpfs for static deployment)\n read_only: true\n tmpfs:\n - /tmp\n - /var/tmp\n - /app/cache:rw\n\n # Redis for static deployment\n redis:\n image: redis:7-alpine\n container_name: news-redis\n restart: unless-stopped\n \n # Redis configuration\n command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru\n \n # Volumes for Redis persistence\n volumes:\n - redis-data:/data\n \n # Networks\n networks:\n - news-network\n \n # Security\n read_only: true\n tmpfs:\n - /tmp\n \n # Resource limits\n deploy:\n resources:\n limits:\n cpus: '0.2'\n memory: 128M\n\n# Named volumes\nvolumes:\n redis-data:\n driver: local\n\n# Networks\nnetworks:\n news-network:\n driver: bridge