Browse Source

Allow the user to use bitcoin-cli inside the container instead of the host's

migrate-pregen
nicolas.dorier 7 years ago
parent
commit
6dcaf43271
  1. 9
      Regtest/README.md
  2. 4
      Regtest/bitcoin.conf
  3. 1
      Regtest/docker-bitcoin-cli.ps1
  4. 5
      Regtest/docker-compose.yml

9
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
```

4
Regtest/bitcoin.conf

@ -1,4 +0,0 @@
regtest=1
rpcport=8081
rpcpassword=DwubwWsoo3
rpcuser=ceiwHEbqWI83

1
Regtest/docker-bitcoin-cli.ps1

@ -0,0 +1 @@
docker exec -ti btcpayserver_regtest_bitcoind bitcoin-cli -regtest -conf="/data/bitcoin.conf" -datadir="/data" $args

5
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"

Loading…
Cancel
Save