Add new docker-compose using btcd

This commit is contained in:
yzernik 2021-10-02 23:51:23 -07:00
parent 93743f8f5b
commit 842441c616
7 changed files with 166 additions and 42 deletions

View file

@ -1,17 +1,26 @@
[node]
network=testnet
price_msat=100000
max_squeaks_per_address_per_block=100
[lnd]
host=lnd
external_host=lnd_for_container
tls_cert_path=~/.lnd/tls.cert
macaroon_path=~/.lnd/data/chain/bitcoin/testnet/admin.macaroon
[bitcoin]
rpc_host=bitcoin-core
rpc_port=18332
rpc_host=btcd
rpc_port=18334
rpc_user=devuser
rpc_pass=devpass
zeromq_hashblock_port=28334
rpc_use_ssl=true
rpc_ssl_cert=/rpc/rpc.cert
[postgresql]
host=db
user=postgres
password=postgres
[webadmin]
enabled=true

View file

@ -0,0 +1,127 @@
version: '3'
services:
btcd:
image: btcd
container_name: btcd
build:
context: ../
dockerfile: docker/btcd/Dockerfile
volumes:
- shared_data:/rpc
- ~/.btcd:/data
environment:
- NETWORK=testnet
- MINING_ADDRESS
ports:
- 18556:18556
entrypoint: ["./start-btcd.sh"]
btcctl:
image: btcd
container_name: btcctl
build:
context: ../
dockerfile: docker/btcd/Dockerfile
volumes:
- shared_data:/rpc
- ~/.btcd:/data
environment:
- NETWORK=testnet
- RPCHOST=btcd
- MINING_ADDRESS
links:
- "btcd:btcd"
entrypoint: ["./start-btcctl.sh"]
lnd_client:
image: lnd
container_name: lnd_client
build:
context: ../
dockerfile: docker/lnd/Dockerfile
environment:
- NETWORK=testnet
- RPCHOST=btcd
volumes:
- shared_data:/rpc
- lnd_client_dir:/root/.lnd
links:
- "btcd:btcd"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
entrypoint: ["./start-lnd.sh"]
lnd_server:
image: lnd
container_name: lnd_server
build:
context: ../
dockerfile: docker/lnd/Dockerfile
environment:
- NETWORK=testnet
- RPCHOST=btcd
volumes:
- shared_data:/rpc
- lnd_server_dir:/root/.lnd
links:
- "btcd:blockchain"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
entrypoint: ["./start-lnd.sh"]
squeaknode:
image: squeaknode
container_name: squeaknode
build:
context: ../
dockerfile: Dockerfile
depends_on:
- "lnd_server"
volumes:
- shared_data:/rpc
- lnd_server_dir:/root/.lnd
- ./config.ini:/config.ini
ports:
- 12995:12994
links:
- "btcd:btcd"
- "lnd_server:lnd"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
entrypoint: ["./start-squeaknode.sh"]
squeaknode_other:
image: squeaknode
container_name: squeaknode_other
build:
context: ../
dockerfile: Dockerfile
volumes:
- shared_data:/rpc
- lnd_client_dir:/root/.lnd
- ./config.ini:/config.ini
ports:
- 12996:12994
links:
- "btcd:btcd"
- "lnd_client:lnd"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
entrypoint: ["./start-squeaknode.sh"]
volumes:
# btcctl and lnd containers.
shared_data:
driver: local
# # bitcoin_data volume is needed for maintaining blockchain persistence
# # during btcd container recreation.
# bitcoin_data:
# driver: local
# lnd_dir volume is needed for sharing tht tls certificate
lnd_client_dir:
driver: local
lnd_server_dir:
driver: local

View file

@ -15,14 +15,6 @@ services:
-zmqpubhashblock=tcp://0.0.0.0:28334
-zmqpubhashtx=tcp://0.0.0.0:28334
lnd:
environment:
- NETWORK=testnet
lnd_other:
environment:
- NETWORK=testnet
# squeaknode:
# environment:
# - NETWORK=testnet

View file

@ -11,9 +11,9 @@ services:
- 18332:18332
- 28334:28334
lnd:
lnd_for_host:
image: lnd
container_name: lnd
container_name: lnd_for_host
build:
context: ../
dockerfile: docker/lnd/Dockerfile
@ -31,8 +31,9 @@ services:
- net.ipv6.conf.all.disable_ipv6=0
entrypoint: ["./start-lnd.sh"]
lnd_other:
lnd_for_container:
image: lnd
container_name: lnd_for_container
build:
context: ../
dockerfile: docker/lnd/Dockerfile
@ -40,7 +41,9 @@ services:
- RPCHOST=bitcoin-core
- BACKEND=bitcoind
volumes:
- lnd_other_dir:/root/.lnd
- lnd_for_container_dir:/root/.lnd
ports:
- 9736:9735
links:
- "bitcoin-core:bitcoin-core"
sysctls:
@ -58,7 +61,7 @@ services:
context: ../
dockerfile: Dockerfile
volumes:
- lnd_other_dir:/root/.lnd
- lnd_for_container_dir:/root/.lnd
- ./config.ini:/config.ini
ports:
- 12995:12994
@ -66,14 +69,14 @@ services:
- 18557:18555
links:
- "bitcoin-core:bitcoin-core"
- "lnd_other:lnd"
- "lnd_for_container:lnd"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
entrypoint: ["./start-squeaknode.sh"]
volumes:
# lnd_dir volume is needed for sharing the tls certificate
lnd_other_dir:
lnd_for_container_dir:
driver: local
# # postgres db data

View file

@ -47,18 +47,7 @@ NETWORK=$(set_default "$NETWORK" "testnet")
CHAIN=$(set_default "$CHAIN" "bitcoin")
BACKEND=$(set_default "$BACKEND" "btcd")
if [[ "$BACKEND" == "neutrino" ]]; then
exec lnd \
--noseedbackup \
--logdir="/data" \
"--$CHAIN.active" \
"--$CHAIN.$NETWORK" \
"--$CHAIN.node"="$BACKEND" \
--rpclisten=0.0.0.0:10009 \
--debuglevel="$DEBUG" \
--tlsextradomain=lnd \
"$@"
elif [[ "$BACKEND" == "bitcoind" ]]; then
if [[ "$BACKEND" == "bitcoind" ]]; then
cmd="lnd \
--noseedbackup \
--logdir=/data \
@ -81,16 +70,16 @@ elif [[ "$BACKEND" == "bitcoind" ]]; then
else
exec lnd \
--noseedbackup \
--logdir="/data" \
"--$CHAIN.active" \
"--$CHAIN.$NETWORK" \
"--$CHAIN.node"="$BACKEND" \
"--$BACKEND.rpccert"="/rpc/rpc.cert" \
"--$BACKEND.rpchost"="$RPCHOST" \
"--$BACKEND.rpcuser"="$RPCUSER" \
"--$BACKEND.rpcpass"="$RPCPASS" \
--logdir=/data \
--$CHAIN.active \
--$CHAIN.$NETWORK \
--$CHAIN.node=$BACKEND \
--$BACKEND.rpccert=/rpc/rpc.cert \
--$BACKEND.rpchost=$RPCHOST \
--$BACKEND.rpcuser=$RPCUSER \
--$BACKEND.rpcpass=$RPCPASS \
--rpclisten=0.0.0.0:10009 \
--debuglevel="$DEBUG" \
--debuglevel=$DEBUG \
--tlsextradomain=lnd \
"$@"
$@
fi

View file

@ -252,6 +252,12 @@ export default function WalletPage() {
</FormLabel>
<Typography size="md">{lndInfo.getIdentityPubkey()}</Typography>
</Grid>
<Grid item>
<FormLabel>
Node urls
</FormLabel>
<Typography size="md">{lndInfo.getUrisList()}</Typography>
</Grid>
<Grid item>
<FormLabel>
Synced to Chain

View file

@ -13,8 +13,6 @@ services:
environment:
- NETWORK=simnet
- MINING_ADDRESS
ports:
- 18556:18556
entrypoint: ["./start-btcd.sh"]
btcctl: