Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
213 lines (200 loc) Β· 6.66 KB
/
Copy pathdocker-compose.yml
File metadata and controls
213 lines (200 loc) Β· 6.66 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
version: "3.9"
# ββ MARC on Stellar β Development Environment ββββββββββββββββββββββββββββββ
#
# Prerequisites:
# Docker 24+ with Compose v2
#
# Quick start:
# cp .env.example .env # fill in secrets
# docker compose up # starts soroban-rpc + all agents
# docker compose up buyer # interactive TUI only
#
# Services:
# soroban-rpc local Stellar devnet (Soroban-enabled, port 8000)
# sdk build the marc-stellar-sdk TypeScript package
# dashboard web dashboard UI (port 3000)
# registry agent discovery API (port 4500)
# seller-* agent workers (ports 4501-4504)
# buyer interactive Blessed TUI (healthcheck port 4550, stdin required)
x-node: &node
image: node:22-slim
working_dir: /app
volumes:
- .:/app
env_file: ${ENV_FILE:-.env}
networks:
- marc-net
services:
soroban-rpc:
image: stellar/quickstart:latest
command: --local --enable-soroban
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8000/.well-known/stellar.toml"]
interval: 15s
timeout: 5s
retries: 10
start_period: 40s
networks:
- marc-net
# ββ SDK (one-shot build) ββββββββββββββββββββββββββββββββββββββββββββββββββ
sdk:
<<: *node
working_dir: /app/sdk
command: sh -c "npm install --silent 2>/dev/null && npm run build"
restart: "no"
profiles: ["setup"]
# ββ Web Dashboard ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
dashboard:
<<: *node
working_dir: /app/dashboard
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx server.ts
"
ports:
- "3000:3000"
depends_on:
sdk:
condition: service_completed_successfully
soroban-rpc:
condition: service_healthy
# ββ Agent Registry ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
registry:
<<: *node
working_dir: /app/agents/registry
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx server.ts
"
ports:
- "4500:4500"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:4500/health || node -e \"fetch('http://localhost:4500/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""]
interval: 5s
timeout: 3s
retries: 5
depends_on:
sdk:
condition: service_completed_successfully
# ββ Seller Agents βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
seller-webbuilder:
<<: *node
working_dir: /app/agents/seller-webbuilder
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx index.ts
"
ports:
- "4501:4501"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:4501/health || node -e \"fetch('http://localhost:4501/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
depends_on:
sdk:
condition: service_completed_successfully
registry:
condition: service_healthy
seller-copywriter:
<<: *node
working_dir: /app/agents/seller-copywriter
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx index.ts
"
ports:
- "4502:4502"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:4502/health || node -e \"fetch('http://localhost:4502/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
depends_on:
sdk:
condition: service_completed_successfully
registry:
condition: service_healthy
seller-namer:
<<: *node
working_dir: /app/agents/seller-namer
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx index.ts
"
ports:
- "4503:4503"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:4503/health || node -e \"fetch('http://localhost:4503/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
depends_on:
sdk:
condition: service_completed_successfully
registry:
condition: service_healthy
seller-researcher:
<<: *node
working_dir: /app/agents/seller-researcher
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx index.ts
"
ports:
- "4504:4504"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:4504/health || node -e \"fetch('http://localhost:4504/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 3
start_period: 20s
depends_on:
sdk:
condition: service_completed_successfully
registry:
condition: service_healthy
# ββ Soroban Event Indexer βββββββββββββββββββββββββββββββββββββββββββββββββ
indexer:
<<: *node
working_dir: /app/indexer
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx src/index.ts
"
depends_on:
sdk:
condition: service_completed_successfully
soroban-rpc:
condition: service_healthy
# ββ Buyer TUI (interactive) βββββββββββββββββββββββββββββββββββββββββββββββ
buyer:
<<: *node
working_dir: /app/agents/buyer
command: sh -c "
npm install --silent 2>/dev/null &&
npx tsx index.ts
"
ports:
- "4550:4550"
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:4550/health || node -e \"fetch('http://localhost:4550/health').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))\""]
interval: 10s
timeout: 5s
retries: 3
start_period: 15s
stdin_open: true
tty: true
depends_on:
sdk:
condition: service_completed_successfully
registry:
condition: service_started
networks:
marc-net:
driver: bridge