56 lines
1.6 KiB
YAML
56 lines
1.6 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:-8080}:8080"
|
|
|
|
restart: unless-stopped
|
|
|
|
# N5095 heeft 4 cores. Geef agent er 3, laat 1 voor QTS.
|
|
# Memory: 4GB is ruim voor één Claude Code sessie + één npm install.
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "3.0"
|
|
memory: 4g
|
|
reservations:
|
|
cpus: "0.5"
|
|
memory: 512m
|
|
|
|
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"
|