txoo: entrypoint update use BITCOIN_RPC_URL

- common env var
Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh 2023-12-14 23:19:10 +05:30
parent 4ae7afa4a5
commit f9de5cfa30
No known key found for this signature in database
GPG Key ID: D3239BA6109A2CE7
3 changed files with 13 additions and 7 deletions

View File

@ -32,10 +32,9 @@ services:
volumes:
- txoo_regtest:/root/.txoo/
- bitcoin_regtest:/root/.bitcoin/
command:
- -r http://rpcuser:VLSsigner1@bitcoind:38332
environment:
- BITCOIN_NETWORK=regtest
- BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:38332
vls:
container_name: vlsd-regtest

View File

@ -47,8 +47,6 @@ services:
image: txood:${IMAGE_TAG:-latest}
container_name: txood-test
restart: unless-stopped
command:
- -r http://rpcuser:VLSsigner1@bitcoind:18332
networks:
- lightning
volumes:
@ -59,6 +57,7 @@ services:
condition: service_healthy
environment:
- BITCOIN_NETWORK=testnet
- BITCOIND_RPC_URL=http://rpcuser:VLSsigner1@bitcoind:18332
vls:
build:

View File

@ -1,10 +1,18 @@
#!/bin/sh
set -e
set -ex
if [ $(echo "$1" | cut -c1) = "-" ]; then
echo "$0: assuming arguments for txood"
set -- txood --network $BITCOIN_NETWORK "$@"
set -- txood "$@"
fi
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "txood" ]; then
echo "$0: setting network to $BITCOIN_NETWORK"
echo "$0: setting RPC URL to $BITCOIND_RPC_URL"
set -- "$@" --network $BITCOIN_NETWORK -r $BITCOIND_RPC_URL
fi
echo