-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (137 loc) · 3.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
141 lines (137 loc) · 3.47 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
services:
redis:
image: redis:7-alpine
command: redis-server ${REDIS_PASSWORD:+--requirepass ${REDIS_PASSWORD}}
ports:
- "127.0.0.1:6379:6379"
healthcheck:
test:
[
"CMD",
"redis-cli",
"${REDIS_PASSWORD:+-a}",
"${REDIS_PASSWORD:-}",
"ping",
]
interval: 5s
timeout: 3s
retries: 5
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
zookeeper:
image: confluentinc/cp-zookeeper:7.6.0
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
healthcheck:
test: ["CMD", "nc", "-z", "localhost", "2181"]
interval: 10s
timeout: 5s
retries: 10
start_period: 15s
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
kafka:
image: confluentinc/cp-kafka:7.6.0
depends_on:
zookeeper:
condition: service_healthy
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://kafka:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT_INTERNAL
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
healthcheck:
test:
[
"CMD",
"kafka-topics",
"--bootstrap-server",
"localhost:9092",
"--list",
]
interval: 15s
timeout: 10s
retries: 15
start_period: 30s
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
# Gateway role (ADR-013): HTTP / WebSocket / A2A front door. Exposes /health;
# builds NO task-consuming actors. This is what the board connects to.
kaiban-gateway:
build:
context: .
args:
ROLE: gateway
depends_on:
redis:
condition: service_healthy
kafka:
condition: service_healthy
ports:
- "3000:3000"
environment:
ROLE: gateway
REDIS_URL: redis://redis:6379
KAFKA_BROKERS: kafka:29092
KAFKA_CLIENT_ID: kaiban-gateway
KAFKA_GROUP_ID: kaiban-group
MESSAGING_DRIVER: bullmq
PORT: "3000"
SERVICE_NAME: kaiban-gateway
AGENT_IDS: gateway
restart: on-failure
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
# Worker role (ADR-013): LLM-backed task-consuming agent pool. No HTTP surface,
# so no /health probe. Scale this tier independently of the gateway.
kaiban-worker:
build:
context: .
args:
ROLE: worker
depends_on:
redis:
condition: service_healthy
kafka:
condition: service_healthy
environment:
ROLE: worker
REDIS_URL: redis://redis:6379
KAFKA_BROKERS: kafka:29092
KAFKA_CLIENT_ID: kaiban-worker
KAFKA_GROUP_ID: kaiban-group
MESSAGING_DRIVER: bullmq
SERVICE_NAME: kaiban-worker
AGENT_IDS: researcher,writer
restart: on-failure
# Worker role has no HTTP /health — disable the inherited Dockerfile probe.
healthcheck:
disable: true
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M