-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcompose.yml
More file actions
197 lines (187 loc) · 4.83 KB
/
compose.yml
File metadata and controls
197 lines (187 loc) · 4.83 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
services:
# Lux ID Service (Casdoor-based unified authentication)
lux-id:
image: casbin/casdoor:latest
container_name: bridge-lux-id
ports:
- "8000:8000"
environment:
- RUNNING_IN_DOCKER=true
volumes:
- ./config/casdoor/app.conf:/conf/app.conf
- lux-id-data:/var/lib/casdoor
networks:
- bridge-network
depends_on:
lux-id-db:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000"]
interval: 5s
timeout: 3s
retries: 5
# Lux ID Database (PostgreSQL for Casdoor)
lux-id-db:
image: ghcr.io/hanzoai/sql:latest
container_name: bridge-lux-id-db
environment:
- POSTGRES_USER=casdoor
- POSTGRES_PASSWORD=${CASDOOR_DB_PASSWORD:-changeme}
- POSTGRES_DB=casdoor
volumes:
- lux-id-db-data:/var/lib/postgresql/data
ports:
- "5434:5432"
networks:
- bridge-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U casdoor"]
interval: 5s
timeout: 3s
retries: 5
# KMS: use kms.hanzo.ai in production. For local dev, set KMS_TOKEN env var.
# NATS/Consul removed — MPC uses ZAP p2p consensus.
# MPC Nodes (3 nodes for 2-of-3 threshold) — ZAP p2p, no NATS/Consul
mpc-node-0:
image: ghcr.io/luxfi/mpc:latest
container_name: bridge-mpc-0
environment:
- NODE_ID=mpc-node-0
- NODE_PORT=6000
- DATA_DIR=/data/mpc
- LOG_LEVEL=info
volumes:
- mpc-data-0:/data/mpc
ports:
- "6000:6000"
networks:
- bridge-network
depends_on:
postgres:
condition: service_healthy
mpc-node-1:
image: ghcr.io/luxfi/mpc:latest
container_name: bridge-mpc-1
environment:
- NODE_ID=mpc-node-1
- NODE_PORT=6000
- DATA_DIR=/data/mpc
- LOG_LEVEL=info
volumes:
- mpc-data-1:/data/mpc
ports:
- "6001:6000"
networks:
- bridge-network
depends_on:
postgres:
condition: service_healthy
mpc-node-2:
image: ghcr.io/luxfi/mpc:latest
container_name: bridge-mpc-2
environment:
- NODE_ID=mpc-node-2
- NODE_PORT=6000
- DATA_DIR=/data/mpc
- LOG_LEVEL=info
volumes:
- mpc-data-2:/data/mpc
ports:
- "6002:6000"
networks:
- bridge-network
depends_on:
postgres:
condition: service_healthy
# Database
postgres:
image: ghcr.io/hanzoai/sql:latest
container_name: bridge-postgres
environment:
- POSTGRES_USER=bridge
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-changeme}
- POSTGRES_DB=bridge
volumes:
- postgres-data:/var/lib/postgresql/data
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5433:5432"
networks:
- bridge-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U bridge"]
interval: 5s
timeout: 3s
retries: 5
# Bridge Server
bridge-server:
image: ghcr.io/luxfi/bridge-server:latest
container_name: bridge-server
environment:
- NODE_ENV=development
- PORT=5000
- DATABASE_URL=postgresql://bridge:${POSTGRES_PASSWORD:-changeme}@postgres:5432/bridge
- NODE_ID=bridge-server-0
- MPC_THRESHOLD=2
- MPC_TOTAL_NODES=3
- MPC_KEY_PREFIX=bridge/mpc
# Lux ID (Casdoor) Authentication
- AUTH_PROVIDER=casdoor
- CASDOOR_ENDPOINT=http://lux-id:8000
- CASDOOR_CLIENT_ID=lux-bridge
- CASDOOR_CLIENT_SECRET=${CASDOOR_CLIENT_SECRET:-changeme}
- CASDOOR_ORGANIZATION=lux-network
- CASDOOR_APPLICATION=bridge
ports:
- "5000:5000"
networks:
- bridge-network
depends_on:
- postgres
- lux-id
- mpc-node-0
- mpc-node-1
- mpc-node-2
volumes:
- ./app/server:/app
- /app/node_modules
command: npm run dev
# Bridge UI
bridge-ui:
image: ghcr.io/luxfi/bridge-ui:latest
container_name: bridge-ui
environment:
- NEXT_PUBLIC_API_URL=http://localhost:5000
- NEXT_PUBLIC_CHAIN_ENV=local
# Lux ID (Casdoor) Authentication
- NEXT_PUBLIC_AUTH_PROVIDER=casdoor
- NEXT_PUBLIC_CASDOOR_ENDPOINT=http://localhost:8000
- NEXT_PUBLIC_CASDOOR_CLIENT_ID=lux-bridge
- NEXT_PUBLIC_CASDOOR_ORGANIZATION=lux-network
- NEXT_PUBLIC_CASDOOR_APPLICATION=bridge
- NEXT_PUBLIC_CASDOOR_REDIRECT_URI=http://localhost:3000/auth/callback
ports:
- "3000:3000"
networks:
- bridge-network
depends_on:
- bridge-server
- lux-id
volumes:
- ./app/bridge:/app
- /app/node_modules
- /app/.next
command: npm run dev
volumes:
lux-id-data:
lux-id-db-data:
mpc-data-0:
mpc-data-1:
mpc-data-2:
postgres-data:
networks:
bridge-network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16