Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Docker): env var ABCI changes abci option in config.toml #742

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading