version: '3.8'
services:
mcp-server:
build:
context: .
dockerfile: Dockerfile
container_name: 42crunch-mcp-server
ports:
- "8000:8000"
environment:
- 42C_TOKEN=${42C_TOKEN}
env_file:
- .env
restart: always
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8000/health', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
- mcp-network
# Security options
security_opt:
- no-new-privileges:true
read_only: false
tmpfs:
- /tmp
networks:
mcp-network:
driver: bridge