Skip to content

Commit 67bb7f7

Browse files
feat: add Docker Compose for LND, Bitcoind, and Electrs
Sets up a local environment for LND integration testing in CI Closes 505
1 parent 9c02f23 commit 67bb7f7

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ swift.swiftdoc
2727
/bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
2828
/bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
2929
/bindings/kotlin/ldk-node-jvm/lib/src/main/resources/
30+
31+
# Ignorar pasta lnd gerada pelo docker
32+
data_lnd

docker-compose-lnd.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
services:
2+
bitcoin:
3+
image: blockstream/bitcoind:24.1
4+
platform: linux/amd64
5+
command:
6+
[
7+
"bitcoind",
8+
"-printtoconsole",
9+
"-regtest=1",
10+
"-rpcallowip=0.0.0.0/0",
11+
"-rpcbind=0.0.0.0",
12+
"-rpcuser=user",
13+
"-rpcpassword=pass",
14+
"-fallbackfee=0.00001",
15+
"-zmqpubrawblock=tcp://0.0.0.0:28332",
16+
"-zmqpubrawtx=tcp://0.0.0.0:28333"
17+
]
18+
ports:
19+
- "18443:18443" # Regtest RPC port
20+
- "18444:18444" # Regtest P2P port
21+
- "28332:28332" # ZMQ block port
22+
- "28333:28333" # ZMQ tx port
23+
networks:
24+
- bitcoin-electrs
25+
healthcheck:
26+
test: ["CMD", "bitcoin-cli", "-regtest", "-rpcuser=user", "-rpcpassword=pass", "getblockchaininfo"]
27+
interval: 5s
28+
timeout: 10s
29+
retries: 5
30+
31+
electrs:
32+
image: blockstream/esplora:electrs-cd9f90c115751eb9d2bca9a4da89d10d048ae931
33+
platform: linux/amd64
34+
depends_on:
35+
bitcoin:
36+
condition: service_healthy
37+
command:
38+
[
39+
"/app/electrs_bitcoin/bin/electrs",
40+
"-vvvv",
41+
"--timestamp",
42+
"--jsonrpc-import",
43+
"--cookie=user:pass",
44+
"--network=regtest",
45+
"--daemon-rpc-addr=bitcoin:18443",
46+
"--http-addr=0.0.0.0:3002",
47+
"--electrum-rpc-addr=0.0.0.0:50001"
48+
]
49+
ports:
50+
- "3002:3002"
51+
- "50001:50001"
52+
networks:
53+
- bitcoin-electrs
54+
55+
lnd:
56+
image: lightninglabs/lnd:v0.18.5-beta
57+
container_name: ldk-node-lnd
58+
depends_on:
59+
- bitcoin
60+
volumes:
61+
- ./data_lnd:/root/.lnd
62+
ports:
63+
- "8081:8081"
64+
- "8080:8080"
65+
- "9735:9735"
66+
command:
67+
- "--noseedbackup"
68+
- "--trickledelay=5000"
69+
- "--alias=ldk-node-lnd-test"
70+
- "--externalip=lnd:9735"
71+
- "--bitcoin.active"
72+
- "--bitcoin.regtest"
73+
- "--bitcoin.node=bitcoind"
74+
- "--bitcoind.rpchost=bitcoin:18443"
75+
- "--bitcoind.rpcuser=user"
76+
- "--bitcoind.rpcpass=pass"
77+
- "--bitcoind.zmqpubrawblock=tcp://bitcoin:28332"
78+
- "--bitcoind.zmqpubrawtx=tcp://bitcoin:28333"
79+
- "--accept-keysend"
80+
- "--rpclisten=0.0.0.0:8081"
81+
- "--restlisten=0.0.0.0:8080"
82+
- "--tlsextradomain=lnd"
83+
- "--tlsextraip=0.0.0.0"
84+
networks:
85+
- bitcoin-electrs
86+
87+
networks:
88+
bitcoin-electrs:
89+
driver: bridge

0 commit comments

Comments
 (0)