Table of contents
duniter/duniter🔗
Duniter is the software that supports the Äž1 libre-currency blockchain.
Duniter is a crypto-currency software based on the Polkadot SDK framework to operate the libre currency.
Minimal docker-compose file for an mirror node🔗
version: "3.5"
services:
duniter-mirror:
image: duniter/duniter-gdev:latest
restart: unless-stopped
ports:
# Prometheus endpoint
- 9615:9615
# rpc
- 9944:9944
# p2p
- 30333:30333
volumes:
- data-mirror:/var/lib/duniter/
environment:
- DUNITER_CHAIN_NAME=gdev
- DUNITER_NODE_NAME=<my-node-name>
volumes:
data-mirror:Minimal docker-compose file for a validator node🔗
version: "3.5"
services:
duniter-validator:
image: duniter/duniter-gdev:latest
restart: unless-stopped
ports:
# Prometheus endpoint
- 9615:9615
# p2p
- 30333:30333
volumes:
- data-validator:/var/lib/duniter/
environment:
- DUNITER_CHAIN_NAME=gdev
- DUNITER_VALIDATOR=true
- DUNITER_NODE_NAME=<my-validator-node-name>
volumes:
data-validator:Local manual-sealing chain (gtest/g1)🔗
Build a local image (separate from production image build) with the runtime you want:
docker build -f docker/local.Dockerfile --build-arg chain=gtest -t duniter/duniter-v2s-gtest-local:latest .
docker build -f docker/local.Dockerfile --build-arg chain=g1 -t duniter/duniter-v2s-g1-local:latest .
Production image builds keep using docker/Dockerfile.
Run a local chain:
docker run --rm -it -p9944:9944 -p30333:30333 \
-e DUNITER_CHAIN_NAME=gtest_local \
duniter/duniter-v2s-gtest-local:latest
Using a *_local chain automatically enables local mode in the entrypoint:
--validator --unsafe-force-node-key-generation --sealing manual --tmp.
Environment variables🔗
| Name | Description | Default |
|---|---|---|
DUNITER_NODE_NAME | The node name. This name will appear on the Substrate telemetry server when telemetry is enabled. | Random name |
DUNITER_CHAIN_NAME | The chain spec to run (for example dev, gdev, gtest_dev, g1_dev, gtest_local, g1_local, or a path to a local raw chainspec JSON file). | dev (development mode) |
DUNITER_PUBLIC_ADDR | The libp2p public address base. See libp2p documentation. This variable is useful when the node is behind a reverse proxy with its ports not directly exposed. Note: the p2p/<peer_id> part of the address shouldn't be set in this variable. It is automatically added by Duniter. | duniter guesses one from the node's IPv4 address. |
DUNITER_LISTEN_ADDR | The libp2p listen address. See libp2p documentation. This variable is useful when running a validator node behind a reverse proxy, to force the P2P end point in websocket mode with:DUNITER_LISTEN_ADDR=/ip4/0.0.0.0/tcp/30333/ws | Non validator node: /ip4/0.0.0.0/tcp/30333/wsValidator node: /ip4/0.0.0.0/tcp/30333 |
DUNITER_RPC_CORS | Value of the polkadot --rpc-cors option. | all |
DUNITER_VALIDATOR | Boolean (true / false) to run the node in validator mode. Configure the polkadot options --validator --rpc-methods Unsafe. | false |
DUNITER_LOCAL_CHAIN | Boolean (true / false) to force local manual-sealing mode. Adds --validator --unsafe-force-node-key-generation --sealing manual --tmp. This mode is automatically enabled when DUNITER_CHAIN_NAME ends with _local. | false |
DUNITER_DISABLE_PROMETHEUS | Boolean to disable the Prometheus endpoint on port 9615. | false |
DUNITER_DISABLE_TELEMETRY | Boolean to disable connecting to the Substrate telemetry server. | false |
DUNITER_PRUNING_PROFILE | _ default_ archive: keep all blocks and state blocks* light: keep only last 256 state blocks and last 14400 blocks (one day duration) | default |
DUNITER_PUBLIC_RPC | The public RPC endpoint to gossip on the network and make available in the apps. | None |
DUNITER_PUBLIC_SQUID | The public Squid graphql endpoint to gossip on the network and make available in the apps. Convention: <domain.tld>/v1/graphql | None |
DUNITER_PUBLIC_ENDPOINTS | Path to a JSON file containing public endpoints to gossip on the network. The file should use the following format:{"endpoints": [ { "protocol": "rpc", "address": "wss://gdev.example.com" }, { "protocol": "squid", "address": "gdev.example.com/v1/graphql" }]} | None |
Other Duniter options🔗
You can pass any other option to Duniter using the command docker-compose element:
command:
# workaround for substrate issue #12073
# https://github.com/paritytech/substrate/issues/12073
- "--wasm-execution=interpreted-i-know-what-i-do"Start Duniter🔗
Once you are happy with your docker-compose.yml file, run in the same folder:
docker compose up -dRunning duniter subcommands or custom set of options🔗
To run duniter from the command line without the default configuration detailed in the "Environment variables" section use -- as the first argument. For example:
$ docker run --rm duniter/duniter-gdev:latest -- key generate
$ docker run --rm duniter/duniter-gdev:latest -- --chain gdev ...