-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
575 lines (550 loc) · 13.3 KB
/
docker-compose.yml
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
x-services:
base-scripts: &base-scripts
image: ${SCRIPTS_IMAGE}
volumes:
- bitcoin-data:/root/.bitcoin
- elements-data:/root/.elements
- cln1-data:/root/.lightning-1
- cln2-data:/root/.lightning-2
- lnd1-data:/root/.lnd-1
- lnd2-data:/root/.lnd-2
- boltz-client-data:/root/.boltz-client
- boltz-data:/root/.boltz-backend
base-lnd: &base-lnd
image: ${LND_IMAGE}
restart: always
depends_on:
bitcoind-init:
condition: service_completed_successfully
command:
- --listen=0.0.0.0:9735
- --rpclisten=0.0.0.0:10009
- --restlisten=0.0.0.0:8081
- --bitcoin.active
- --bitcoin.regtest
- --bitcoin.node=bitcoind
- --bitcoind.rpchost=bitcoind
- --bitcoind.zmqpubrawtx=bitcoind:29000
- --bitcoind.zmqpubrawblock=bitcoind:29001
- --bitcoind.rpccookie=/root/.bitcoin/regtest/.cookie
- --noseedbackup
- --protocol.wumbo-channels
expose:
- 8081
- 9735
volumes_from:
- bitcoind:ro
healthcheck:
test:
[
"CMD-SHELL",
"lncli --network=regtest --rpcserver=$$HOSTNAME --network=regtest getinfo",
]
interval: 1s
timeout: 1s
retries: 30
start_period: 0s
base-cln: &base-cln
image: ${CLN_IMAGE}
restart: always
depends_on:
bitcoind-init:
condition: service_completed_successfully
command:
- --large-channels
- --network
- regtest
- --bind-addr=0.0.0.0:9735
- --bitcoin-rpcconnect=bitcoind
- --bitcoin-rpcport=18443
- --grpc-port=9736
- --dev-bitcoind-poll=3
- --developer
- --dev-fast-gossip
- --dev-fast-reconnect
- --plugin=/root/hold
- --plugin=/root/clnurl
- --plugin=/root/mpay.sh
- --experimental-offers
- --clnurl-host=0.0.0.0
- --ignore-fee-limits=false
expose:
- 9735
- 9736
# LNURL
- 3000
volumes_from:
- bitcoind:ro
healthcheck:
test: ["CMD", "lightning-cli", "--network=regtest", "getinfo"]
timeout: 1s
retries: 20
interval: 1s
start_period: 0s
services:
cleanup:
<<: *base-scripts
restart: no
container_name: boltz-cleanup
entrypoint: ["/bin/bash", "-c", "/cleanup.sh"]
profiles: ["default", "ci"]
postgres:
hostname: postgres
container_name: boltz-postgres
restart: always
image: ${POSTGRES_IMAGE}
healthcheck:
test: ["CMD-SHELL", "pg_isready --dbname boltz --username boltz"]
interval: 5s
timeout: 30s
retries: 10
start_period: 5s
environment:
- POSTGRES_DB=boltz
- POSTGRES_USER=boltz
- POSTGRES_PASSWORD=boltz
profiles: ["default", "ci"]
ports:
- 5432:5432
expose:
- 5432
boltz-backend:
hostname: boltz
container_name: boltz-backend
depends_on:
regtest-start:
condition: service_completed_successfully
postgres:
condition: service_healthy
restart: always
image: ${BOLTZ_BACKEND_IMAGE}
ports:
- 9000:9000
volumes:
- boltz-data:/root/.boltz
- lnd2-data:/data/lnd
- cln2-data:/root/.lightning
- elements-data:/root/.elements
volumes_from:
- bitcoind:ro
healthcheck:
test: ["CMD-SHELL", "timeout 1 bash -c 'echo > /dev/tcp/127.0.0.1/9000'"]
timeout: 1s
retries: 10
interval: 1s
start_period: 0s
profiles: ["default", "ci"]
boltz-backend-nginx:
hostname: boltz-nginx
container_name: boltz-backend-nginx
depends_on:
boltz-backend:
condition: service_healthy
restart: always
image: ${NGINX_IMAGE}
ports:
- 9001:9001
volumes:
- nginx-data:/etc/nginx/conf.d
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:9001/version"]
timeout: 1s
retries: 10
interval: 1s
start_period: 0s
profiles: ["default", "ci"]
boltz-web-app:
hostname: web-app
container_name: boltz-web-app
depends_on:
boltz-backend-nginx:
condition: service_healthy
restart: always
image: ${BOLTZ_WEBAPP_IMAGE}
ports:
- 8080:80
profiles: ["default"]
boltz-client:
hostname: boltz-client
container_name: boltz-client
depends_on:
boltz-backend-nginx:
condition: service_healthy
restart: always
image: ${BOLTZ_CLIENT_IMAGE}
ports:
- 9002:9002
- 9003:9003
healthcheck:
test: ["CMD", "boltzcli", "--host", "boltz-client", "getinfo"]
interval: 5s
timeout: 3s
retries: 10
start_period: 0s
volumes:
- cln2-data:/root/.lightning
- elements-data:/root/.elements
- boltz-client-data:/root/.boltz
profiles: ["default"]
anvil:
hostname: anvil
container_name: boltz-anvil
image: ${FOUNDRY_IMAGE}
# Chain ID 33 is the regtest of Rootstock
entrypoint: "anvil --host 0.0.0.0 --chain-id 33"
ports:
- 8545:8545
healthcheck:
test: ["CMD-SHELL", "timeout 1 bash -c 'echo > /dev/tcp/127.0.0.1/8545'"]
timeout: 1s
retries: 3
interval: 1s
start_period: 0s
profiles: ["default", "ci"]
rif-relay:
hostname: rif-relay
container_name: boltz-rif-relay
image: ${RIF_RELAY_IMAGE}
depends_on:
anvil:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -s localhost:8090/chain-info"]
timeout: 1s
retries: 10
interval: 2s
start_period: 15s
ports:
- 8090:8090
profiles: ["default", "ci"]
bitcoind:
container_name: boltz-bitcoind
hostname: bitcoind
restart: always
image: ${BITCOIN_CORE_IMAGE}
command:
- -regtest
- -fallbackfee=0.00000253
- -zmqpubrawtx=tcp://0.0.0.0:29000
- -zmqpubrawblock=tcp://0.0.0.0:29001
- -txindex
- -rpcallowip=0.0.0.0/0
- -rpcbind=0.0.0.0
- -deprecatedrpc=warnings
depends_on:
cleanup:
condition: service_completed_successfully
expose:
- 18443
- 18444
ports:
- 18443:18443
- 18444:18444
- 29000:29000
- 29001:29001
volumes:
- bitcoin-data:/root/.bitcoin
healthcheck:
test:
[
"CMD",
"bitcoin-cli",
"--rpccookiefile=/root/.bitcoin/regtest/.cookie",
"-regtest",
"getblockchaininfo",
]
timeout: 1s
retries: 1
interval: 1s
start_period: 0s
profiles: ["default", "ci"]
elementsd:
container_name: boltz-elementsd
hostname: elements
restart: always
image: ${ELEMENTS_IMAGE}
depends_on:
cleanup:
condition: service_completed_successfully
expose:
- 31001
ports:
- 31000:31000
- 31002:31002
- 18884:18884
volumes:
- elements-data:/root/.elements
healthcheck:
test: ["CMD", "elements-cli", "-getinfo"]
timeout: 1s
retries: 1
interval: 1s
start_period: 0s
profiles: ["default", "ci"]
cln-1:
container_name: boltz-cln-1
hostname: cln-1
<<: *base-cln
ports:
- 9736:9736
- 3000:3000
volumes:
- cln1-data:/root/.lightning
profiles: ["default", "ci"]
cln-2:
container_name: boltz-cln-2
hostname: cln-2
<<: *base-cln
ports:
- 9737:9736
- 9738:9292
- 9739:9293
volumes:
- cln2-data:/root/.lightning
profiles: ["default", "ci"]
lnd-1:
<<: *base-lnd
container_name: boltz-lnd-1
hostname: lnd-1
ports:
- 8081:8081
- 10009:10009
volumes:
- lnd1-data:/root/.lnd/
profiles: ["default", "ci"]
lnd-2:
<<: *base-lnd
container_name: boltz-lnd-2
hostname: lnd-2
ports:
- 11009:10009
volumes:
- lnd2-data:/root/.lnd/
profiles: ["default", "ci"]
bitcoind-init:
<<: *base-scripts
restart: no
container_name: boltz-bitcoind-init
entrypoint:
["/bin/bash", "-c", "source /etc/profile.d/utils.sh && bitcoind-init"]
depends_on:
- bitcoind
profiles: ["default", "ci"]
regtest-start:
<<: *base-scripts
restart: no
container_name: boltz-regtest-start
entrypoint:
["/bin/bash", "-c", "source /etc/profile.d/utils.sh && regtest-start"]
depends_on:
bitcoind-init:
condition: service_completed_successfully
elementsd:
condition: service_healthy
lnd-1:
condition: service_healthy
lnd-2:
condition: service_healthy
cln-1:
condition: service_healthy
cln-2:
condition: service_healthy
anvil:
condition: service_healthy
rif-relay:
condition: service_healthy
profiles: ["default", "ci"]
scripts:
<<: *base-scripts
restart: no
container_name: boltz-scripts
depends_on:
boltz-backend:
condition: service_healthy
profiles: ["default", "ci"]
electrs:
hostname: electrs-bitcoin
container_name: boltz-electrs-bitcoin
restart: always
image: ${ELECTRS_IMAGE}
depends_on:
bitcoind-init:
condition: service_completed_successfully
entrypoint: ["electrs-bitcoin"]
command:
- --electrum-rpc-addr
- electrs:19001
- --http-addr
- electrs:3002
- --daemon-rpc-addr
- bitcoind:18443
- --network
- regtest
- --jsonrpc-import
healthcheck:
test: ["CMD-SHELL", "curl -s $(hostname):3002/blocks/tip/height"]
timeout: 1s
retries: 20
interval: 2s
start_period: 5s
ports:
- 19001:19001
- 3002:3002
volumes:
- bitcoin-data:/root/.bitcoin
profiles: ["default", "ci"]
electrs-liquid:
hostname: electrs-liquid
container_name: boltz-electrs-liquid
restart: always
image: ${ELECTRS_IMAGE}
depends_on:
elementsd:
condition: service_healthy
entrypoint: ["electrs-liquid"]
command:
- --electrum-rpc-addr
- electrs-liquid:19002
- --http-addr
- electrs-liquid:3003
- --daemon-rpc-addr
- elementsd:18884
- --daemon-dir
- /root/.elements
- --cookie
- regtest:regtest
- --network
- liquidregtest
- --parent-network
- regtest
- --jsonrpc-import
healthcheck:
test: ["CMD-SHELL", "curl -s $(hostname):3003/blocks/tip/height"]
timeout: 15s
retries: 20
interval: 2s
start_period: 5s
ports:
- 19002:19002
- 3003:3003
volumes:
- elements-data:/root/.elements
profiles: ["default", "ci"]
esplora:
hostname: esplora
container_name: boltz-esplora
restart: always
image: ${ESPLORA_IMAGE}
depends_on:
electrs:
condition: service_healthy
electrs-liquid:
condition: service_healthy
ports:
- 4002:4002
- 4003:4003
profiles: ["default"]
otterscan:
hostname: otterscan
container_name: boltz-otterscan
restart: always
image: ${OTTERSCAN_IMAGE}
environment:
- OTTERSCAN_CONFIG={"erigonURL":"http://localhost:8545","chainInfo":{"name":"Anvil","faucets":[],"nativeCurrency":{"name":"Rootstock BTC","symbol":"RBTC","decimals":18}}}
depends_on:
anvil:
condition: service_healthy
ports:
- 5100:80
profiles: ["default"]
nbxplorer:
container_name: boltz-nbxplorer
image: ${NBXPLORER_IMAGE}
restart: unless-stopped
ports:
- "32838:32838"
expose:
- "32838"
environment:
NBXPLORER_NETWORK: regtest
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:18443/
NBXPLORER_BTCRPCCOOKIEFILE: /root/.bitcoin/regtest/.cookie
NBXPLORER_BTCNODEENDPOINT: bitcoind:18444
NBXPLORER_BIND: 0.0.0.0:32838
NBXPLORER_MINGAPSIZE: 5
NBXPLORER_MAXGAPSIZE: 10
NBXPLORER_VERBOSE: 1
NBXPLORER_POSTGRES: User ID=boltz;Password=boltz;Include Error Detail=true;Host=postgres;Port=5432;Database=nbxplorer
NBXPLORER_EXPOSERPC: 1
NBXPLORER_NOAUTH: 1
depends_on:
bitcoind-init:
condition: service_completed_successfully
volumes:
- bitcoin-data:/root/.bitcoin
profiles: ["btcpay"]
volumes:
boltz-data:
name: boltz-backend-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/backend
boltz-client-data:
name: boltz-client-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/boltz-client
bitcoin-data:
name: boltz-bitcoind-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/bitcoind
elements-data:
name: boltz-elements-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/elements
cln1-data:
name: boltz-cln1-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/cln1
cln2-data:
name: boltz-cln2-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/cln2
lnd1-data:
name: boltz-lnd1-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/lnd1
lnd2-data:
name: boltz-lnd2-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/lnd2
nginx-data:
name: boltz-nginx-data
driver: local
driver_opts:
type: none
o: bind
device: ./data/backend-nginx/