From a72347f3e05df0e852c1e61ba36cd2b223791ce4 Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:43:47 +0100 Subject: [PATCH] feat(Docker): env var ABCI changes abci option in config.toml (#742) * feat(Docker): env var ABCI changes abci option in config.toml * chore: fix typo in Dockerfile --- DOCKER/Dockerfile | 2 +- DOCKER/docker-entrypoint.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 878a8b8f4e..75ea89ad6e 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -93,7 +93,7 @@ COPY --from=compile /src/tenderdash/build/tenderdash /src/tenderdash/build/abcid # You can overwrite these before the first run to influence # config.json and genesis.json. Additionally, you can override # CMD to add parameters to `tenderdash node`. -ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain +ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain ABCI="" COPY ./DOCKER/docker-entrypoint.sh /usr/local/bin/ diff --git a/DOCKER/docker-entrypoint.sh b/DOCKER/docker-entrypoint.sh index bd080c46f5..0863cfd022 100755 --- a/DOCKER/docker-entrypoint.sh +++ b/DOCKER/docker-entrypoint.sh @@ -15,8 +15,14 @@ if [ ! -d "$TMHOME/config" ]; then -e 's/^prometheus\s*=.*/prometheus = true/' \ "$TMHOME/config/config.toml" + if [ -n "$ABCI" ]; then + sed -i \ + -e "s/^abci\s*=.*/abci = \"$ABCI\"/" \ + "$TMHOME/config/config.toml" + fi + jq ".chain_id = \"$CHAIN_ID\" | .consensus_params.block.time_iota_ms = \"500\"" \ - "$TMHOME/config/genesis.json" > "$TMHOME/config/genesis.json.new" + "$TMHOME/config/genesis.json" >"$TMHOME/config/genesis.json.new" mv "$TMHOME/config/genesis.json.new" "$TMHOME/config/genesis.json" fi