docker-compose.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. version: '3.8'
  2. services:
  3. # 内容寻找 Agent 服务
  4. content-finder:
  5. build:
  6. context: .
  7. dockerfile: Dockerfile.content-finder
  8. container_name: agent-content-finder
  9. restart: unless-stopped
  10. ports:
  11. - "8080:8080"
  12. volumes:
  13. - ./data/traces:/app/.trace
  14. environment:
  15. - OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY}
  16. - MODEL=${MODEL:-anthropic/claude-sonnet-4.6}
  17. - TEMPERATURE=${TEMPERATURE:-0.3}
  18. - MAX_ITERATIONS=${MAX_ITERATIONS:-30}
  19. - TRACE_DIR=/app/.trace
  20. - PORT=8080
  21. - MAX_CONCURRENT_TASKS=${MAX_CONCURRENT_TASKS:-3}
  22. healthcheck:
  23. test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
  24. interval: 30s
  25. timeout: 10s
  26. retries: 3
  27. start_period: 40s
  28. # 可视化 API 服务
  29. api-server:
  30. build:
  31. context: .
  32. dockerfile: Dockerfile.api-server
  33. container_name: agent-api-server
  34. restart: unless-stopped
  35. ports:
  36. - "8000:8000"
  37. volumes:
  38. - ./data/traces:/app/.trace
  39. healthcheck:
  40. test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
  41. interval: 30s
  42. timeout: 10s
  43. retries: 3
  44. start_period: 40s
  45. # 前端服务
  46. frontend:
  47. build:
  48. context: .
  49. dockerfile: Dockerfile.frontend
  50. container_name: agent-frontend
  51. restart: unless-stopped
  52. ports:
  53. - "3000:3000"
  54. healthcheck:
  55. test: ["CMD", "curl", "-f", "http://localhost:3000"]
  56. interval: 30s
  57. timeout: 10s
  58. retries: 3
  59. start_period: 10s