docs: setting up env variable

Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
This commit is contained in:
Lakshya Singh 2023-09-22 20:18:52 +05:30
parent 5c2d225be2
commit cbb68c442b
No known key found for this signature in database
GPG Key ID: D3239BA6109A2CE7

View File

@ -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 <override_file> 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