Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
use cookieauth for bitcoind (#6)
Browse files Browse the repository at this point in the history
* use cookieauth for bitcoind
* expose bitcoind and elementsd RPC ports to host
* expose lnd-2 rpc to host
* expose 29000, 29001, 31000 & 31002 to host

---------

Co-authored-by: AR <[email protected]>
  • Loading branch information
maybeast and AR authored Jul 25, 2024
1 parent df9b614 commit 2ba8711
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ data/boltz/*
!data/boltz-client
data/boltz-client/*
!data/boltz-client/boltz.toml

# Editor config
.idea/
3 changes: 1 addition & 2 deletions data/boltz/boltz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ maxZeroConfAmount = 0
zmqpubrawtx = "tcp://bitcoind:29000"
zmqpubrawblock = "tcp://bitcoind:29001"
port = 18_443
user = "regtest"
password = "regtest"
cookie = "/root/.bitcoin/regtest/.cookie"

[currencies.lnd]
host = "lnd-2"
Expand Down
45 changes: 23 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ services:
- ./data/lnd-2:/data/lnd/
- ./data/boltz/:/root/.boltz/
- ./data/elements/:/root/.elements/
volumes_from:
- bitcoind:ro

boltz-client:
hostname: boltz-client
Expand Down Expand Up @@ -51,13 +53,12 @@ services:
- -txindex
- -rpcallowip=0.0.0.0/0
- -rpcbind=0.0.0.0
- -rpcuser=regtest
- -rpcpassword=regtest
expose:
- 29000
- 29001
- 18443
- 18444
ports:
- 18443:18443
- 29000:29000
- 29001:29001
volumes:
- ./data/bitcoin:/root/.bitcoin

Expand All @@ -68,10 +69,11 @@ services:
depends_on:
- bitcoind
expose:
- 18884
- 31000
- 31001
- 31002
ports:
- 31000:31000
- 31002:31002
- 18884:18884
volumes:
- ./data/elements/elements.conf:/home/elements/.elements/elements.conf

Expand All @@ -88,8 +90,6 @@ services:
- --bind-addr=0.0.0.0:9735
- --bitcoin-rpcconnect=bitcoind
- --bitcoin-rpcport=18443
- --bitcoin-rpcuser=regtest
- --bitcoin-rpcpassword=regtest
- --grpc-port=9736
- --dev-bitcoind-poll=3
- --dev-fast-gossip
Expand All @@ -101,6 +101,8 @@ services:
- 9736:9736
volumes:
- ./data/clightning-1:/root/.lightning/
volumes_from:
- bitcoind:ro

clightning-2:
hostname: clightning-2
Expand All @@ -115,8 +117,6 @@ services:
- --bind-addr=0.0.0.0:9735
- --bitcoin-rpcconnect=bitcoind
- --bitcoin-rpcport=18443
- --bitcoin-rpcuser=regtest
- --bitcoin-rpcpassword=regtest
- --grpc-port=9736
- --dev-bitcoind-poll=3
- --dev-fast-gossip
Expand All @@ -127,6 +127,8 @@ services:
- 9736
volumes:
- ./data/clightning-2:/root/.lightning/
volumes_from:
- bitcoind:ro

lnd-1:
hostname: lnd-1
Expand All @@ -144,8 +146,7 @@ services:
- --bitcoind.rpchost=bitcoind
- --bitcoind.zmqpubrawtx=bitcoind:29000
- --bitcoind.zmqpubrawblock=bitcoind:29001
- --bitcoind.rpcuser=regtest
- --bitcoind.rpcpass=regtest
- --bitcoind.rpccookie=/root/.bitcoin/regtest/.cookie
- --noseedbackup
- --protocol.wumbo-channels
expose:
Expand All @@ -157,6 +158,8 @@ services:
- 10009:10009
volumes:
- ./data/lnd-1:/root/.lnd/
volumes_from:
- bitcoind:ro

lnd-2:
hostname: lnd-2
Expand All @@ -174,16 +177,18 @@ services:
- --bitcoind.rpchost=bitcoind
- --bitcoind.zmqpubrawtx=bitcoind:29000
- --bitcoind.zmqpubrawblock=bitcoind:29001
- --bitcoind.rpcuser=regtest
- --bitcoind.rpcpass=regtest
- --bitcoind.rpccookie=/root/.bitcoin/regtest/.cookie
- --noseedbackup
- --protocol.wumbo-channels
expose:
- 8081
- 9735
- 10009
ports:
- 11009:10009
volumes:
- ./data/lnd-2:/root/.lnd/
volumes_from:
- bitcoind:ro

electrs:
hostname: electrs
Expand All @@ -197,10 +202,6 @@ services:
- electrs:3002
- --daemon-rpc-addr
- bitcoind:18443
- --daemon-dir
- /home/elements/.elements
- --cookie
- regtest:regtest
- --network
- regtest
- --jsonrpc-import
Expand All @@ -209,7 +210,7 @@ services:
- 19001:19001
- 3002:3002
volumes:
- ./data/elements:/home/elements/.elements
- ./data/bitcoin:/app/.bitcoin

electrs-liquid:
hostname: electrs-liquid
Expand Down
2 changes: 1 addition & 1 deletion docker-scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export COMPOSE_PROJECT_NAME=regtest

bitcoin-cli-sim() {
docker exec regtest-bitcoind-1 bitcoin-cli -rpcuser=regtest -rpcpassword=regtest -regtest "$@"
docker exec regtest-bitcoind-1 bitcoin-cli --rpccookiefile=/root/.bitcoin/regtest/.cookie -regtest "$@"
}

elements-cli-sim() {
Expand Down

0 comments on commit 2ba8711

Please sign in to comment.