This repository contains a Dockerfile for building a dockerized version of the BSC node and a compose file to run it along side the Orakuru Crystal Ball node.
These files are meant to be a template, customized to your specific use case.
Docker: Instructions
Docker Compose: Instructions
Crystal Ball configuration files: Official Gitbook
You will need to first create two directories. One will contain your crystal-ball configuration files, the other will contain your BSC node data.
If you have not synced the BSC node yet, you can use an empty directory here and the script will write the genesis block and start the sync for you.
Please follow the official documentation for setting up your crystal-ball configuration files.
Assuming your crystal-ball config directory is ~/.orakuru
and your BSC node data directory is ~/node
.
git clone https://github.com/yes-but-also-no/orakuru-node-docker-compose
Using your editor of choice, modify docker-compose.yml
to update the volume mount points:
services:
bsc:
...
volumes:
- ~/node:/bsc/node
orakuru:
...
volumes:
- ~/.orakuru:/orakuru/etc
...
Some other things you can do in this file:
- Remove port mapping from the
orakuru
service if you are not using Prometheus monitoring - Add a build argument to the
bsc
service to build for mainnet:BSC_NETWORK: mainnet
The only change you will need to make that differs fromt the official documentation will be the value of url
in web3.yml
.
To point the crystal-ball to your bsc node, you will use url: ws://bsc:8576
. If you are planning to customize docker-compose.yml
further, please see this page for more information about how networking works within a docker-compose file.
If you make any changes to the bsc-node/Dockerfile
you will need to re-run this step.
docker-compose build bsc
To start both crystal-ball
and the bsc node
in the background:
docker-compose up -d
To stop both crystal-ball
and the bsc node
:
docker-compose down
To start only one of the services:
docker-compose up [-d] <bsc/orakuru>
docker exec bsc /bsc/geth attach ws://bsc:8576 --exec eth.syncing
This command will print either the current block being synced or false
if the node is still connecting to peers or is up to date.
To update the crystal-ball service, open docker-compose.yml
in your favorite editor and modify the version tag for the orakuru
service.
Then run:
docker-compose up [-d] orakuru