scrum4me-docker/docker-compose.yml
Madhura68 318a071f11 chore(deploy): docker resources sizing for Apple M2 host
Verruimt de container-limits van 3 cores / 4 GB (oude QNAP N5095 target)
naar 6 cores / 8 GB voor draaien op een Apple M2 met 16 GB unified
memory. Reservations omhoog naar 1 core / 1 GB.

Aanname: M2 base (8 cores). Pas omlaag aan voor M2 base met 8 GB host
of omhoog voor M2 Pro/Max.

NB: README.md en CLAUDE.md verwijzen nog steeds naar QNAP/N5095. Niet
in deze PR aangepast — apart op te schonen als de QNAP-deploy
definitief wegvalt.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 08:05:54 +02:00

58 lines
1.7 KiB
YAML

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"