This repository comes with built-in Dockerfile to support docker containers. This README serves as documentation.
The Dockerfile
performs the following steps:
- Obtain base image (phusion/baseimage:0.10.1)
- Install required dependencies using
apt-get
- Add leedex-core source code into container
- Update git submodules
- Perform
cmake
with build typeRelease
- Run
make
andmake_install
(this will install binaries into/usr/local/bin
- Purge source code off the container
- Add a local leedex user and set
$HOME
to/var/lib/leedex
- Make
/var/lib/leedex
and/etc/leedex
a docker volume - Expose ports
8980
and4776
- Add default config from
docker/default_config.ini
anddocker/default_logging.ini
- Add an entry point script
- Run the entry point script by default
The entry point simplifies the use of parameters for the witness_node
(which is run by default when spinning up the container).
$LEEDEXD_SEED_NODES
$LEEDEXD_RPC_ENDPOINT
$LEEDEXD_PLUGINS
$LEEDEXD_REPLAY
$LEEDEXD_RESYNC
$LEEDEXD_P2P_ENDPOINT
$LEEDEXD_WITNESS_ID
$LEEDEXD_PRIVATE_KEY
$LEEDEXD_TRACK_ACCOUNTS
$LEEDEXD_PARTIAL_OPERATIONS
$LEEDEXD_MAX_OPS_PER_ACCOUNT
$LEEDEXD_ES_NODE_URL
$LEEDEXD_TRUSTED_NODE
The default configuration is:
p2p-endpoint = 0.0.0.0:4776
rpc-endpoint = 0.0.0.0:8980
bucket-size = [60,300,900,1800,3600,14400,86400]
history-per-size = 1000
max-ops-per-account = 100
partial-operations = true
With docker compose, multiple nodes can be managed with a single
docker-compose.yaml
file:
version: '3'
services:
main:
# Image to run
image: leedex/leedex-core:latest
#
volumes:
- ./docker/conf/:/etc/leedex/
# Optional parameters
environment:
- LEEDEXD_ARGS=--help
version: '3'
services:
fullnode:
# Image to run
image: leedex/leedex-core:latest
environment:
# Optional parameters
environment:
- LEEDEXD_ARGS=--help
ports:
- "0.0.0.0:8980:8980"
volumes:
- "leedex-fullnode:/var/lib/leedex"
This container is properly registered with Ghrc container registry as:
Going forward, every release tag as well as all pushes to testnet
will be built into ready-to-run containers, there.
One can use docker compose to setup a trusted full node together with a delayed node like this:
version: '3'
services:
fullnode:
image: ghrc.io/leedex-chain/leedex-core:latest
ports:
- "0.0.0.0:8980:8980"
volumes:
- "leedex-fullnode:/var/lib/leedex"
delayed_node:
image: leedex/leedex-core:latest
environment:
- 'LEEDEXD_PLUGINS=delayed_node witness'
- 'LEEDEXD_TRUSTED_NODE=ws://fullnode:8980'
ports:
- "0.0.0.0:8981:8980"
volumes:
- "leedex-delayed_node:/var/lib/leedex"
links:
- fullnode
volumes:
leedex-fullnode: