use lnbits again, add 3rd lnd node

This commit is contained in:
dni 2022-08-12 11:21:02 +02:00
commit 11857bba5a
4 changed files with 10 additions and 5 deletions

View file

@ -18,9 +18,10 @@ add this ENV variables to your `.env` file
```console ```console
DEBUG=true DEBUG=true
LNBITS_BACKEND_WALLET_CLASS="LndRestWallet" LNBITS_BACKEND_WALLET_CLASS="LndRestWallet"
LND_REST_ENDPOINT="https://localhost:8081/" LND_REST_ENDPOINT=https://127.0.0.1:8081/
LND_REST_CERT="./docker/data/lnd-2/tls.cert" LND_REST_CERT=/home/user/repos/lnbits-legend/docker/data/lnd-1/tls.cert
LND_REST_MACAROON="./docker/data/lnd-2/chain/bitcoin/regtest/admin.macaroon" LND_REST_MACAROON=/home/user/repos/lnbits-legend/docker/data/lnd-1/data/chain/bitcoin/regtest/admin.macaroon
poetry run uvicorn --host 0.0.0.0 --port 5000 --reload
``` ```
# usage # usage
@ -54,9 +55,11 @@ lncli-sim 2 listpeers
* mempool: http://localhost:8080/ * mempool: http://localhost:8080/
* boltz api: http://localhost:9001/ * boltz api: http://localhost:9001/
* lnd-1 rest: http://localhost:8081/ * lnd-1 rest: http://localhost:8081/
* lnbits: http://localhost:5001/
# debugging docker logs # debugging docker logs
```console ```console
docker logs lnbits-legend-lnbits-1 -f
docker logs lnbits-legend-boltz-1 -f docker logs lnbits-legend-boltz-1 -f
docker logs lnbits-legend-clightning-1-1 -f docker logs lnbits-legend-clightning-1-1 -f
docker logs lnbits-legend-lnd-2-1 -f docker logs lnbits-legend-lnd-2-1 -f

View file

@ -7,7 +7,8 @@ services:
- boltz - boltz
- mempool-api - mempool-api
- lnd-3 - lnd-3
image: lnbitsdocker/lnbits-legend image: lnbits-legend
# image: lnbitsdocker/lnbits-legend
restart: on-failure restart: on-failure
user: "0:0" user: "0:0"
entrypoint: "sh -c 'sleep 30; poetry run uvicorn lnbits.__main__:app --port 5001 --host lnbits'" entrypoint: "sh -c 'sleep 30; poetry run uvicorn lnbits.__main__:app --port 5001 --host lnbits'"

View file

@ -82,6 +82,7 @@ lnbits-lightning-sync(){
wait-for-clightning-sync 2 wait-for-clightning-sync 2
wait-for-lnd-sync 1 wait-for-lnd-sync 1
wait-for-lnd-sync 2 wait-for-lnd-sync 2
wait-for-lnd-sync 3
} }
lnbits-lightning-init(){ lnbits-lightning-init(){

2
tests
View file

@ -57,7 +57,7 @@ done
run "boltz service status" "200" $(curl -s -o /dev/null --head -w "%{http_code}" "http://localhost:9001/version") run "boltz service status" "200" $(curl -s -o /dev/null --head -w "%{http_code}" "http://localhost:9001/version")
run "mempool service status" "200" $(curl -s -o /dev/null --head -w "%{http_code}" "http://localhost:8080/") run "mempool service status" "200" $(curl -s -o /dev/null --head -w "%{http_code}" "http://localhost:8080/")
run "lnbits service status" "200" $(curl -s -o /dev/null --head -w "%{http_code}" "http://localhost:5001/") run "lnbits service status" "200" $(curl -s -o /dev/null -w "%{http_code}" "http://localhost:5001/")
# return non-zero exit code if a test fails # return non-zero exit code if a test fails
if [[ "$failed" == "true" ]]; then if [[ "$failed" == "true" ]]; then