docker-compose.yml•1.76 kB
version: '3.8'
services:
fastmail-mcp-server:
build:
context: .
dockerfile: Dockerfile
image: fastmail-mcp-server:latest
container_name: fastmail-mcp-server
restart: unless-stopped
# Environment variables
environment:
- NODE_ENV=production
- MCP_TRANSPORT=stdio
# FastMail API configuration - set these in .env file or override
- FASTMAIL_API_TOKEN=${FASTMAIL_API_TOKEN}
- FASTMAIL_EMAIL=${FASTMAIL_EMAIL}
- FASTMAIL_SEND_AS=${FASTMAIL_SEND_AS:-${FASTMAIL_EMAIL}}
- FASTMAIL_ALIAS_DOMAIN=${FASTMAIL_ALIAS_DOMAIN:-fastmail.com}
- FASTMAIL_JMAP_URL=${FASTMAIL_JMAP_URL:-https://jmap.fastmail.com/jmap/session}
# Environment file (create this with your actual credentials)
env_file:
- .env
# Resource limits
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.1'
memory: 64M
# Health check
healthcheck:
test: ["CMD", "node", "-e", "console.log('Health check passed')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Volumes for persistent data (optional)
volumes:
- mcp-data:/app/data
# Network configuration
networks:
- mcp-network
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Security options
security_opt:
- no-new-privileges:true
# Read-only root filesystem for security
read_only: true
tmpfs:
- /tmp
- /var/tmp
# Named volumes
volumes:
mcp-data:
driver: local
# Networks
networks:
mcp-network:
driver: bridge