From aa34613e52dac41cad37b0e7f01f824ce2d34f4e Mon Sep 17 00:00:00 2001 From: Taariq Levack Date: Tue, 19 Jul 2022 08:52:54 +0200 Subject: [PATCH] Custom chain ID from env --- deployment/docker/bootstrap/bootstrap_init.sh | 6 +----- deployment/docker/devimage/bootstrap_init_no_stop.sh | 6 +----- deployment/dockerfiles/custom-node.Dockerfile | 2 +- deployment/dockerfiles/release.Dockerfile | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/deployment/docker/bootstrap/bootstrap_init.sh b/deployment/docker/bootstrap/bootstrap_init.sh index d1bc84f2b..cfedb05d8 100644 --- a/deployment/docker/bootstrap/bootstrap_init.sh +++ b/deployment/docker/bootstrap/bootstrap_init.sh @@ -6,11 +6,7 @@ if [ ! -e "$file" ]; then rm -rf ~/.secretd/* rm -rf /opt/secret/.sgx_secrets/* - if [ -z "${CHAINID}" ]; then - chain_id="$CHAINID" - else - chain_id="supernova-1" - fi + chain_id=${CHAINID:-supernova-1} mkdir -p ./.sgx_secrets secretd config chain-id "$chain_id" diff --git a/deployment/docker/devimage/bootstrap_init_no_stop.sh b/deployment/docker/devimage/bootstrap_init_no_stop.sh index 677174c59..7744ef3e9 100755 --- a/deployment/docker/devimage/bootstrap_init_no_stop.sh +++ b/deployment/docker/devimage/bootstrap_init_no_stop.sh @@ -7,11 +7,7 @@ then rm -rf ~/.secretd/* rm -rf /opt/secret/.sgx_secrets/* - if [ -z "${CHAINID}" ]; then - chain_id="$CHAINID" - else - chain_id="secretdev-1" - fi + chain_id=${CHAINID:-secretdev-1} mkdir -p ./.sgx_secrets secretd config chain-id "$chain_id" diff --git a/deployment/dockerfiles/custom-node.Dockerfile b/deployment/dockerfiles/custom-node.Dockerfile index 56be1311a..07abca887 100644 --- a/deployment/dockerfiles/custom-node.Dockerfile +++ b/deployment/dockerfiles/custom-node.Dockerfile @@ -68,7 +68,7 @@ RUN mkdir -p /root/.secretd/.node/ ####### Node parameters ARG MONIKER=default -ARG CHAINID=secret-testnet-1 +ARG CHAINID=secretdev-1 ARG GENESISPATH=https://raw.githubusercontent.com/enigmampc/SecretNetwork/master/secret-testnet-genesis.json ARG PERSISTENT_PEERS=201cff36d13c6352acfc4a373b60e83211cd3102@bootstrap.southuk.azure.com:26656 diff --git a/deployment/dockerfiles/release.Dockerfile b/deployment/dockerfiles/release.Dockerfile index 038a7e09e..8feb6221d 100644 --- a/deployment/dockerfiles/release.Dockerfile +++ b/deployment/dockerfiles/release.Dockerfile @@ -68,7 +68,7 @@ RUN mkdir -p /root/config/ ####### Node parameters ARG MONIKER=default -ARG CHAINID=secret-testnet-1 +ARG CHAINID=secretdev-1 ARG GENESISPATH=https://raw.githubusercontent.com/enigmampc/SecretNetwork/master/secret-testnet-genesis.json ARG PERSISTENT_PEERS=201cff36d13c6352acfc4a373b60e83211cd3102@bootstrap.southuk.azure.com:26656