docker-compose.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. - /home/data/trace:/app/.trace
  14. - /home/data/output:/app/.output
  15. environment:
  16. - OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY}
  17. - MODEL=${MODEL:-anthropic/claude-sonnet-4.6}
  18. - TEMPERATURE=${TEMPERATURE:-0.3}
  19. - MAX_ITERATIONS=${MAX_ITERATIONS:-30}
  20. - TRACE_DIR=/app/.trace
  21. - OUTPUT_DIR=/app/.output
  22. - PORT=8080
  23. - MAX_CONCURRENT_TASKS=${MAX_CONCURRENT_TASKS:-3}
  24. healthcheck:
  25. test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
  26. interval: 30s
  27. timeout: 10s
  28. retries: 3
  29. start_period: 40s
  30. # 可视化 API 服务
  31. api-server:
  32. build:
  33. context: .
  34. dockerfile: Dockerfile.api-server
  35. container_name: agent-api-server
  36. restart: unless-stopped
  37. ports:
  38. - "8000:8000"
  39. volumes:
  40. - /home/data/trace:/app/.trace
  41. healthcheck:
  42. test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
  43. interval: 30s
  44. timeout: 10s
  45. retries: 3
  46. start_period: 40s
  47. # 前端服务
  48. frontend:
  49. build:
  50. context: .
  51. dockerfile: Dockerfile.frontend
  52. container_name: agent-frontend
  53. restart: unless-stopped
  54. ports:
  55. - "3000:3000"
  56. healthcheck:
  57. test: ["CMD", "curl", "-f", "http://localhost:3000"]
  58. interval: 30s
  59. timeout: 10s
  60. retries: 3
  61. start_period: 10s