# ============================================================
# Nucleus Sovereign Agent OS — Docker Compose (EU DORA)
# ============================================================
# Jurisdiction: European Union — Digital Operational Resilience Act
# Data Residency: Required (EU/EEA only)
# Audit Retention: 7 years (2555 days)
# HITL: 5 operation types require human approval
# Kill Switch: Required
#
# Usage:
#   docker compose -f docker-compose.eu-dora.yml up -d
#   docker compose -f docker-compose.eu-dora.yml run nucleus kyc demo
#   docker compose -f docker-compose.eu-dora.yml run nucleus audit-report --format html -o /app/.brain/report.html
# ============================================================

services:
  nucleus:
    build:
      context: .
      args:
        JURISDICTION: eu-dora
    image: nucleus-agent-os:eu-dora
    container_name: nucleus-eu-dora
    volumes:
      - nucleus-brain:/app/.brain
    environment:
      - NUCLEUS_JURISDICTION=eu-dora
      - NUCLEAR_BRAIN_PATH=/app/.brain
      - NUCLEUS_RATE_LIMIT=100
      - NUCLEUS_RATE_WINDOW_SECONDS=60
    restart: unless-stopped
    # Security: read-only filesystem except for brain volume
    read_only: true
    tmpfs:
      - /tmp:size=100M
    # Resource limits per DORA operational resilience
    deploy:
      resources:
        limits:
          memory: 512M
          cpus: '1.0'
        reservations:
          memory: 128M
          cpus: '0.25'

volumes:
  nucleus-brain:
    driver: local
