Skip to content

Commit 1e34fad

Browse files
committed
Unify Docker Compose files with profiles for CLN, LND, and Eclair
Update CI workflows to use unified Docker Compose with profiles
1 parent 389fcee commit 1e34fad

6 files changed

Lines changed: 121 additions & 165 deletions

File tree

.github/workflows/cln-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
sudo apt-get install -y socat
2020
2121
- name: Start bitcoind, electrs, and lightningd
22-
run: docker compose -f docker-compose-cln.yml up -d
22+
run: docker compose --profile cln up -d
2323

2424
- name: Forward lightningd RPC socket
2525
run: |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI Checks - Eclair Integration Tests
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
check-eclair:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Start bitcoind, electrs, and Eclair
17+
run: docker compose --profile eclair up -d
18+
19+
- name: Wait for Eclair to be ready
20+
run: |
21+
for i in $(seq 1 30); do
22+
if curl -s -u :eclairpassword http://127.0.0.1:8080/getinfo > /dev/null 2>&1; then
23+
echo "Eclair is ready"
24+
break
25+
fi
26+
echo "Waiting for Eclair... ($i/30)"
27+
sleep 5
28+
done
29+
30+
- name: Run Eclair integration tests
31+
run: RUSTFLAGS="--cfg eclair_test" cargo test --test integration_tests_eclair

.github/workflows/lnd-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: echo "LND_DATA_DIR=$(mktemp -d)" >> $GITHUB_ENV
3838

3939
- name: Start bitcoind, electrs, and LND
40-
run: docker compose -f docker-compose-lnd.yml up -d
40+
run: docker compose --profile lnd up -d
4141
env:
4242
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
4343

docker-compose-cln.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

docker-compose-lnd.yml

Lines changed: 0 additions & 86 deletions
This file was deleted.

docker-compose.yml

Lines changed: 88 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3'
2-
31
services:
42
bitcoin:
53
image: blockstream/bitcoind:27.2
@@ -14,11 +12,15 @@ services:
1412
"-rpcuser=user",
1513
"-rpcpassword=pass",
1614
"-fallbackfee=0.00001",
17-
"-rest"
15+
"-rest",
16+
"-zmqpubrawblock=tcp://0.0.0.0:28332",
17+
"-zmqpubrawtx=tcp://0.0.0.0:28333"
1818
]
1919
ports:
2020
- "18443:18443" # Regtest REST and RPC port
2121
- "18444:18444" # Regtest P2P port
22+
- "28332:28332" # ZMQ block port
23+
- "28333:28333" # ZMQ tx port
2224
networks:
2325
- bitcoin-electrs
2426
healthcheck:
@@ -41,10 +43,92 @@ services:
4143
"--cookie=user:pass",
4244
"--network=regtest",
4345
"--daemon-rpc-addr=bitcoin:18443",
44-
"--http-addr=0.0.0.0:3002"
46+
"--http-addr=0.0.0.0:3002",
47+
"--electrum-rpc-addr=0.0.0.0:50001"
4548
]
4649
ports:
4750
- "3002:3002"
51+
- "50001:50001"
52+
networks:
53+
- bitcoin-electrs
54+
55+
cln:
56+
image: blockstream/lightningd:v23.08
57+
platform: linux/amd64
58+
profiles: ["cln"]
59+
depends_on:
60+
bitcoin:
61+
condition: service_healthy
62+
command:
63+
[
64+
"--bitcoin-rpcconnect=bitcoin",
65+
"--bitcoin-rpcport=18443",
66+
"--bitcoin-rpcuser=user",
67+
"--bitcoin-rpcpassword=pass",
68+
"--regtest",
69+
"--experimental-anchors",
70+
]
71+
ports:
72+
- "19846:19846"
73+
- "9937:9937"
74+
networks:
75+
- bitcoin-electrs
76+
77+
lnd:
78+
image: lightninglabs/lnd:v0.18.5-beta
79+
container_name: ldk-node-lnd
80+
profiles: ["lnd"]
81+
depends_on:
82+
bitcoin:
83+
condition: service_healthy
84+
volumes:
85+
- ${LND_DATA_DIR:-/tmp/lnd-data}:/root/.lnd
86+
ports:
87+
- "8081:8081"
88+
- "9735:9735"
89+
command:
90+
- "--noseedbackup"
91+
- "--trickledelay=5000"
92+
- "--alias=ldk-node-lnd-test"
93+
- "--externalip=lnd:9735"
94+
- "--bitcoin.active"
95+
- "--bitcoin.regtest"
96+
- "--bitcoin.node=bitcoind"
97+
- "--bitcoind.rpchost=bitcoin:18443"
98+
- "--bitcoind.rpcuser=user"
99+
- "--bitcoind.rpcpass=pass"
100+
- "--bitcoind.zmqpubrawblock=tcp://bitcoin:28332"
101+
- "--bitcoind.zmqpubrawtx=tcp://bitcoin:28333"
102+
- "--accept-keysend"
103+
- "--rpclisten=0.0.0.0:8081"
104+
- "--tlsextradomain=lnd"
105+
- "--tlsextraip=0.0.0.0"
106+
networks:
107+
- bitcoin-electrs
108+
109+
eclair:
110+
image: acinq/eclair:latest
111+
platform: linux/amd64
112+
profiles: ["eclair"]
113+
depends_on:
114+
bitcoin:
115+
condition: service_healthy
116+
ports:
117+
- "8080:8080"
118+
- "9736:9736"
119+
environment:
120+
- JAVA_OPTS=-Declair.chain=regtest
121+
-Declair.server.port=9736
122+
-Declair.api.enabled=true
123+
-Declair.api.port=8080
124+
-Declair.api.password=eclairpassword
125+
-Declair.bitcoind.host=bitcoin
126+
-Declair.bitcoind.rpcuser=user
127+
-Declair.bitcoind.rpcpassword=pass
128+
-Declair.bitcoind.rpcport=18443
129+
-Declair.bitcoind.wallet=eclair
130+
-Declair.bitcoind.zmqblock=tcp://bitcoin:28332
131+
-Declair.bitcoind.zmqtx=tcp://bitcoin:28333
48132
networks:
49133
- bitcoin-electrs
50134

0 commit comments

Comments
 (0)