๐Ÿ“ฆ anthropics / riv2025-long-horizon-coding-agent-demo

๐Ÿ“„ docker-compose.yml ยท 58 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58version: '3.8'

services:
  claude-code-agent:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: claude-code-agent

    # Command: Pass project, model and ports as CLI arguments
    command: >
      python claude_code.py
      --project ${PROJECT_NAME:-canopy}
      --model ${DEFAULT_MODEL:-claude-opus-4-5-20251101}
      --frontend-port ${DEFAULT_FRONTEND_PORT:-6175}
      --backend-port ${DEFAULT_BACKEND_PORT:-3000}

    # Mount current directory as workspace
    volumes:
      - .:/app/workspace

    # Environment variables
    environment:
      # Set project root to workspace
      - PROJECT_ROOT=/app/workspace

      # Anthropic API key (set in your .env file or pass directly)
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}

    # Network configuration
    network_mode: host

    # Resource limits (simulate ECS Fargate)
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
        reservations:
          cpus: '1.0'
          memory: 4G

    # Restart policy
    restart: unless-stopped

    # Health check (optional)
    healthcheck:
      test: ["CMD", "python", "-c", "import sys; sys.exit(0)"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

# Optional: Add networks if not using host networking
# networks:
#   claude-network:
#     driver: bridge