From 11857bba5acf215c4f08639bd17b4f671ad57236 Mon Sep 17 00:00:00 2001 From: dni Date: Fri, 12 Aug 2022 11:21:02 +0200 Subject: [PATCH] use lnbits again, add 3rd lnd node --- README.md | 9 ++++++--- docker-compose.yml | 3 ++- docker-scripts.sh | 1 + tests | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2256095..ce70dc3 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ add this ENV variables to your `.env` file ```console DEBUG=true LNBITS_BACKEND_WALLET_CLASS="LndRestWallet" -LND_REST_ENDPOINT="https://localhost:8081/" -LND_REST_CERT="./docker/data/lnd-2/tls.cert" -LND_REST_MACAROON="./docker/data/lnd-2/chain/bitcoin/regtest/admin.macaroon" +LND_REST_ENDPOINT=https://127.0.0.1:8081/ +LND_REST_CERT=/home/user/repos/lnbits-legend/docker/data/lnd-1/tls.cert +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 @@ -54,9 +55,11 @@ lncli-sim 2 listpeers * mempool: http://localhost:8080/ * boltz api: http://localhost:9001/ * lnd-1 rest: http://localhost:8081/ +* lnbits: http://localhost:5001/ # debugging docker logs ```console +docker logs lnbits-legend-lnbits-1 -f docker logs lnbits-legend-boltz-1 -f docker logs lnbits-legend-clightning-1-1 -f docker logs lnbits-legend-lnd-2-1 -f diff --git a/docker-compose.yml b/docker-compose.yml index 1cf62ce..aad7954 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,8 @@ services: - boltz - mempool-api - lnd-3 - image: lnbitsdocker/lnbits-legend + image: lnbits-legend + # image: lnbitsdocker/lnbits-legend restart: on-failure user: "0:0" entrypoint: "sh -c 'sleep 30; poetry run uvicorn lnbits.__main__:app --port 5001 --host lnbits'" diff --git a/docker-scripts.sh b/docker-scripts.sh index 745bf5a..0fbb810 100644 --- a/docker-scripts.sh +++ b/docker-scripts.sh @@ -82,6 +82,7 @@ lnbits-lightning-sync(){ wait-for-clightning-sync 2 wait-for-lnd-sync 1 wait-for-lnd-sync 2 + wait-for-lnd-sync 3 } lnbits-lightning-init(){ diff --git a/tests b/tests index 92c1a6e..4a2be85 100755 --- a/tests +++ b/tests @@ -57,7 +57,7 @@ done 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 "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 if [[ "$failed" == "true" ]]; then