diff --git a/Regtest/README.md b/Regtest/README.md index 77804fd..bb0ee05 100644 --- a/Regtest/README.md +++ b/Regtest/README.md @@ -4,17 +4,14 @@ This docker-compose shows how to configure postgres, bitcoind, NBXplorer and BTC It exposes BTCPay on the host address http://localhost:8080/. -It also exposes Bitcoin Core RPC which you can access through port 8081: +If you need to access bitcoind RPC, you can use bitcoin-cli inside the container: -To access it, you can use: On Powershell: - ``` -bitcoin-cli -conf="$pwd/bitcoin.conf" getblockcount +.\docker-bitcoin-cli getblockcount ``` On Linux: - ``` -bitcoin-cli -conf="`pwd`/bitcoin.conf" getblockcount +docker exec -ti btcpayserver_regtest_bitcoind bitcoin-cli -regtest -conf="/data/bitcoin.conf" -datadir="/data" getblockcount ``` \ No newline at end of file diff --git a/Regtest/bitcoin.conf b/Regtest/bitcoin.conf deleted file mode 100644 index 39371d4..0000000 --- a/Regtest/bitcoin.conf +++ /dev/null @@ -1,4 +0,0 @@ -regtest=1 -rpcport=8081 -rpcpassword=DwubwWsoo3 -rpcuser=ceiwHEbqWI83 \ No newline at end of file diff --git a/Regtest/docker-bitcoin-cli.ps1 b/Regtest/docker-bitcoin-cli.ps1 new file mode 100644 index 0000000..5750033 --- /dev/null +++ b/Regtest/docker-bitcoin-cli.ps1 @@ -0,0 +1 @@ +docker exec -ti btcpayserver_regtest_bitcoind bitcoin-cli -regtest -conf="/data/bitcoin.conf" -datadir="/data" $args \ No newline at end of file diff --git a/Regtest/docker-compose.yml b/Regtest/docker-compose.yml index 3af2c42..0726e92 100644 --- a/Regtest/docker-compose.yml +++ b/Regtest/docker-compose.yml @@ -33,13 +33,10 @@ services: - bitcoind bitcoind: + container_name: btcpayserver_regtest_bitcoind image: nicolasdorier/docker-bitcoin:0.15.0.1 environment: BITCOIN_EXTRA_ARGS: "rpcuser=ceiwHEbqWI83\nrpcpassword=DwubwWsoo3\nregtest=1\nrpcport=43782\nport=8332" - BITCOIN_RPC_USER: ceiwHEbqWI83 - BITCOIN_RPC_PASSWORD: DwubwWsoo3 - ports: - - 8081:43782 expose: - "43782" - "8332"