diff --git a/chain-specs/betanet.json b/chain-specs/betanet.json index f570d1ef..17027158 100644 --- a/chain-specs/betanet.json +++ b/chain-specs/betanet.json @@ -2,7 +2,9 @@ "name": "Betanet", "id": "betanet", "chainType": "Live", - "bootNodes": [], + "bootNodes": [ + "/dns4/s0.betanet.stble.io/tcp/30333/p2p/12D3KooWPaen1igo2WYUFCt3EAg4AWjWoMYgmr4tCa2Yb1WfgoDB" + ], "telemetryEndpoints": null, "protocolId": null, "properties": null, diff --git a/docker/README.md b/docker/README.md index c8c3575a..dd2a1e71 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,9 +1,9 @@ # Docker Based Development 1. [Introduction](#introduction) -2. [Alphanet](#alphanet) - 1. [Build](#build-alphanet) - 2. [Run](#build-alphanet) +2. [Running the image](#running-the-image) + 1. [Build](#build) + 2. [Run](#run) 3. [Example](#example) 3. [Test](#test) 1. [Build](#build-testing-image) @@ -13,20 +13,20 @@ Optionally, You can build and run the stability node within Docker directly. it is also possible to run tests in a docker. -## Alphanet +## Running the image -### Build Alphanet +### Build -To build the Docker container, run the following command in the root of the project +To build the Docker container, run the following command at the root of the project. ``` $ docker build -f ./docker/client/Dockerfile -t stability . ``` -### Run Alphanet +### Run ``` -docker run -d -p 30333:30333 -p 9933:9933 -p 9944:9944 -p 9615:9615 stability +docker run -d -p 30333:30333 -p 9933:9933 -p 9944:9944 -p 9615:9615 -e CHAIN="/stability/chain-specs/betanet.json" stability ``` Optional environment variables: @@ -35,14 +35,14 @@ Optional environment variables: - CHAIN and CHAIN_NAME: If you want to use a pre-defined chain spec, you can use the CHAIN_NAME environment variable to specify the name of the chain spec to use. If you want to use a custom chain spec, you can use the CHAIN environment variable to specify the path to the chain spec file to use. If both are specified, CHAIN will be used. By default, the node will use the `dev` chain spec. - NODE_KEY: This environment variable allows specifying the node key to use. If not specified, the node will generate a random node key. This applies to the P2P key, not the account key. - BOOTNODES: This environment variable allows specifying the bootnodes to use, separated by commas. If not specified, the node will use the default bootnodes for the chain spec. -- DEFAULT_BOOTNODE: This environment variable allows specifying the default bootnode to use. If not specified, the node will use the default bootnode of Stability network. +- MODE: This environment variable allows the node to run in different pruning modes. Possible values are "full_node" or "archive". The default value is "full_node". To set an environment variable in the docker run, use the flag -e NAME=VALUE ### Example ``` -docker run -d -p 30333:30333 -p 9933:9933 -p 9944:9944 -p 9615:9615 -e SEED=account -e BOOTNODES=/ip4/... stability +docker run -d -p 30333:30333 -p 9933:9933 -p 9944:9944 -p 9615:9615 -e SEED=account -e CHAIN="/stability/chain-specs/betanet.json" -e MODE=archive -e BOOTNODES=/ip4/... stability ``` ## Test diff --git a/docker/client/entrypoint.sh b/docker/client/entrypoint.sh index 65debac1..045a71ae 100644 --- a/docker/client/entrypoint.sh +++ b/docker/client/entrypoint.sh @@ -46,9 +46,7 @@ if [ -n "$NODE_KEY" ]; then START_COMMAND="$START_COMMAND --node-key $NODE_KEY" fi -if [ "$DEFAULT_BOOTNODE" = "yes" ]; then - START_COMMAND="$START_COMMAND --bootnodes /ip4/3.21.88.38/tcp/30333/p2p/12D3KooWPaen1igo2WYUFCt3EAg4AWjWoMYgmr4tCa2Yb1WfgoDB" -elif [ -n "$BOOTNODES" ]; then +if [ -n "$BOOTNODES" ]; then START_COMMAND="$START_COMMAND --bootnodes $BOOTNODES" fi