mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
Full Setup for public pool
This setup provides a docker-compose setup consisting of Bitcoin Core Node and Public-Pool running in Mainnet or Testnet.
It exposes following ports:
8332/18332Bitcoin RPC onlocalhost8333/18333Bitcoin peering on0.0.0.03333/13333Public-Pool Stratum port on0.0.0.03334/13334Public-Pool API port onlocalhost
The docker-compose setups for Mainnet and Testnet can be run in parallel without any problems.
Building Images
The images are built with
docker compose -f docker-compose-mainnet.yml build
Instead of -mainnet you can use -testnet for Testnet
Preparing directories
Before starting the setup, directories need to be created.
sudo ./prepare.sh
Config files
There are 4 config files for Mainnet and Testnet
mainnet:
public-pool-mainnet.envbitcoin-mainnet.conf
testnet:
public-pool-testnet.envbitcoin-testnet.conf
note: pruning (prune=550) is enabled by default in the config
Running the setup
To start the setup in foreground mode:
docker compose -f docker-compose-mainnet.yml up
To run the setup in detached / background mode use up -d.
In detached mode logs can be watched with:
docker compose -f docker-compose-mainnet.yml logs --tail 100 -f
Stopping the setup
To stop the setup use:
docker compose -f docker-compose-mainnet.yml down
Regtest
After running the regtest setup a couple of blocks need to be generated:
# create wallet
$ docker exec -it bitcoin-regtest /app/bin/bitcoin-cli -conf=/app/data/bitcoin.conf -regtest createwallet "regtestwallet"
# generate 101 blocks
$ docker exec -it bitcoin-regtest /app/bin/bitcoin-cli -conf=/app/data/bitcoin.conf -regtest -generate 101