services: countly-mcp-server: build: context: . dockerfile: Dockerfile container_name: countly-mcp-server restart: unless-stopped # Environment variables (optional - can be provided by MCP client via HTTP headers) environment: # Countly server URL (optional - can be provided via X-Countly-Server-Url header) - COUNTLY_SERVER_URL=${COUNTLY_SERVER_URL:-} # Auth token (optional - can be provided via X-Countly-Auth-Token header) - COUNTLY_AUTH_TOKEN=${COUNTLY_AUTH_TOKEN:-} # Request timeout in milliseconds - COUNTLY_TIMEOUT=${COUNTLY_TIMEOUT:-30000} # Ports ports: - "3000:3000" # Docker secrets (optional - uncomment for production use) # secrets: # - countly_token # Health check healthcheck: test: [ "CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})" ] interval: 30s timeout: 10s retries: 3 start_period: 5s # Logging logging: driver: "json-file" options: max-size: "10m" max-file: "3" # Resource limits (adjust as needed) deploy: resources: limits: cpus: '1' memory: 512M reservations: cpus: '0.5' memory: 256M # Docker secrets configuration (optional - for production use) # Uncomment the secrets section in the service above and this section to use secrets # secrets: # countly_token: # file: ./countly_token.txt # For production with Docker Swarm: # 1. Uncomment the secrets sections above # 2. Create the secret: echo "your-token" | docker secret create countly_token - # 3. Change the secret config to: external: true