Skip to content

Commit

Permalink
feat(Docker): env var ABCI changes abci option in config.toml (#742)
Browse files Browse the repository at this point in the history
* feat(Docker): env var ABCI changes abci option in config.toml

* chore: fix typo in Dockerfile
  • Loading branch information
lklimek authored Feb 29, 2024
1 parent 1fd3b18 commit a72347f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DOCKER/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down
8 changes: 7 additions & 1 deletion DOCKER/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a72347f

Please sign in to comment.