-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
189 lines (178 loc) · 5.91 KB
/
Copy pathdocker-compose.yml
File metadata and controls
189 lines (178 loc) · 5.91 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
version: '3.9'
services:
# Message Queue
rabbitmq:
image: rabbitmq:3-management
ports:
- "5673:5672"
- "15673:15672"
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
volumes:
- rabbitmq_data:/var/lib/rabbitmq
networks:
- ai-team-network
# Database for Context Storage
postgres:
image: pgvector/pgvector:pg16
environment:
POSTGRES_DB: ai_context
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5434:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- ai-team-network
# Redis for Caching
redis:
image: redis:7-alpine
ports:
- "6380:6379"
volumes:
- redis_data:/data
networks:
- ai-team-network
# Orchestration Service with Autonomous Execution
orchestrator:
build: ./services/orchestrator
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/ai_context
REDIS_URL: redis://redis:6379
RABBITMQ_URL: amqp://admin:${RABBITMQ_PASSWORD}@rabbitmq:5672/
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
OPENAI_API_KEY: ${OPENAI_API_KEY}
GOOGLE_API_KEY: ${GOOGLE_API_KEY}
# Autonomous execution configuration
ENABLE_AUTONOMOUS_EXECUTION: "true"
ENABLE_MULTI_AGENT_COORDINATION: "true"
ENABLE_FILE_OPERATIONS: "true"
ENABLE_MCP_INTEGRATION: "true"
# Security and encryption
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
# Authentication (issue #6 / PR #7): JWT verification material so the
# global Depends(get_current_user) fails CLOSED (401) for unauthenticated
# requests on the published :8000 surface. Required — the app rejects all
# non-public routes when no secret/key is configured.
JWT_SECRET: ${JWT_SECRET}
JWT_ALGORITHM: ${JWT_ALGORITHM:-HS256}
JWT_AUDIENCE: ${JWT_AUDIENCE:-}
JWT_ISSUER: ${JWT_ISSUER:-}
# CORS allowlist (comma-separated). NON-wildcard. Wildcard + credentials
# is disallowed by the app and is a security regression.
CORS_ALLOW_ORIGINS: ${CORS_ALLOW_ORIGINS:-http://localhost:3000,http://localhost:3031,http://localhost}
# Claude SDK configuration
CLAUDE_CLI_PATH: "/usr/local/bin/claude"
# Sandbox configuration
DOCKER_HOST: "unix:///var/run/docker.sock"
# Resource limits
MAX_CONCURRENT_EXECUTIONS: "10"
MAX_COORDINATION_SESSIONS: "5"
user: root
# SECURITY (PR #7): do NOT override the image entrypoint. The hardened
# entrypoint.sh runs migrations and launches the AUTHENTICATED app
# `main:app` (global Depends(get_current_user) + non-wildcard CORS + BOLA
# authz). The previous `simple_main:app` override published a demo app with
# ZERO authN and allow_origins=["*"]+credentials on 0.0.0.0:8000.
# simple_main.py is an in-memory demo and is NOT the production surface.
volumes:
- orchestrator_workspaces:/app/workspaces
- orchestrator_backups:/app/.fuzeagent/backups
# Docker socket mounting disabled due to Windows/WSL compatibility issues
# - /var/run/docker.sock:/var/run/docker.sock
depends_on:
- postgres
- redis
- rabbitmq
networks:
- ai-team-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Hierarchy API Service (Organizations and Teams)
hierarchy-api:
build:
context: .
dockerfile: Dockerfile.hierarchy
ports:
- "8006:8006"
environment:
DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/ai_context
ORCHESTRATOR_URL: http://orchestrator:8000
depends_on:
- postgres
- orchestrator
networks:
- ai-team-network
# Management UI (React)
ui:
build: ./services/ui-react
ports:
- "3031:3000" # Changed from 3030 to 3031 to avoid any potential conflicts
environment:
VITE_API_URL: http://localhost:8006
depends_on:
- orchestrator
networks:
- ai-team-network
# MCP Server for Claude Code Integration (SSE Mode)
mcp-server:
build: ./mcp-servers/fuzeagent-server
command: ["python", "server.py", "--transport", "sse", "--host", "0.0.0.0", "--port", "8003"]
ports:
- "8003:8003"
environment:
FUZEAGENT_API_URL: http://hierarchy-api:8006
PYTHONUNBUFFERED: 1
depends_on:
- hierarchy-api
- orchestrator
networks:
- ai-team-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
# Managed-Agents handoff MCP (ported orchestration runtime — see agent-templates/).
# OPT-IN: nothing depends_on this, so a normal `docker compose up` of the existing
# services does not start it. Run explicitly: `docker compose up handoff-mcp`.
# Serves streamable-HTTP MCP at /mcp — point each role's HANDOFF_MCP_URL here.
handoff-mcp:
build:
context: ./agent-templates
dockerfile: orchestration/handoff_mcp/Dockerfile
ports:
- "8010:8000"
environment:
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
# Bearer token gating the MCP. UNAUTHENTICATED (with a loud warning) if unset.
HANDOFF_MCP_TOKEN: ${HANDOFF_MCP_TOKEN}
FUZE_STATE_DIR: /state
PYTHONUNBUFFERED: 1
volumes:
# Provisioned id state (agent-ids/vault-ids/memory-ids.json) from providers/provision.py.
# Ids are not secrets; CI publishes them as an artifact/ConfigMap.
- ./agent-templates/sync/.state:/state:ro
networks:
- ai-team-network
restart: unless-stopped
networks:
ai-team-network:
driver: bridge
volumes:
postgres_data:
redis_data:
rabbitmq_data:
orchestrator_workspaces:
orchestrator_backups: