services: agent: build: context: . args: # Pin een specifieke commit van scrum4me-mcp in productie. # Aanpassen + `docker compose build` om te roteren. MCP_GIT_REF: ${MCP_GIT_REF:-main} CLAUDE_CODE_VERSION: ${CLAUDE_CODE_VERSION:-latest} AGENT_UID: ${AGENT_UID:-1000} AGENT_GID: ${AGENT_GID:-1000} image: scrum4me-agent-runner:local container_name: scrum4me-agent env_file: - .env # Volumes: drie persistent op de NAS-share, één tmpfs voor de per-job # working trees zodat ze nooit op de NAS-share belanden. volumes: - ${NAS_BASE:-/share/Agent}/cache:/var/cache - ${NAS_BASE:-/share/Agent}/logs:/var/log/agent - ${NAS_BASE:-/share/Agent}/state:/var/run/agent tmpfs: - /tmp:size=4g,mode=1777 ports: - "${AGENT_HEALTH_PORT_HOST:-18080}:8080" restart: unless-stopped # Apple M2 host (8 cores, ≥16 GB unified). Geef de agent royaal de # ruimte voor parallelle npm/tsx/git-werk; macOS + Docker Desktop # gebruiken zelf ook merkbaar geheugen, dus laat 4-8 GB over. # Pas omlaag aan voor M2 base met 8 GB of omhoog voor M2 Pro/Max. deploy: resources: limits: cpus: "6.0" memory: 8g reservations: cpus: "1.0" memory: 1g healthcheck: test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"] interval: 30s timeout: 5s retries: 3 start_period: 60s # Logging: laat docker-driver de stdout/stderr afvangen, gecapped op # ~50MB totaal. De daemon-loop schrijft eigen run-logs naar /var/log/agent. logging: driver: json-file options: max-size: "10m" max-file: "5"