diff --git a/README.md b/README.md index 54d10df..006529b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,40 @@ docker volume create lightning_data docker compose up --build ``` +## Using Bitcoin Chains + +We have three possible overrides over the default `testnet` configuration in `docker-compose.yml`: +- `docker-compose.testnet.yml` +- `docker-compose.regtest.yml` +- `docker-compose.mainnet.yml` + +To use override we have to pass it down both the config using `-f` flag: +``` +docker compose -f docker-compose.yml -f up --build +``` + +__Note__: Even while using `testnet` running using the override is recommended as that will expose the `P2P` port for `bitcoind` and `P2P` port for `lightningd` on the host. + +## Additional Regtest Commands + +We have to run these commands after bitcoind is up and running. + +Create Wallet: +``` +docker container exec -it bitcoind bitcoin-cli createwallet default +``` + +Generate Address for node: +``` +docker container exec -it bitcoind bitcoin-cli getnewaddress +``` + +Generate Blocks +``` +docker container exec -it bitcoind bitcoin-cli generatetoaddress 50 $NODE_ADDRESS + +``` + ### References - [bitcoind](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/23/alpine/Dockerfile) by @ruimarinho