Skip to content

Commit

Permalink
move genesis bin creation and link to init.sh
Browse files Browse the repository at this point in the history
This is to tolerate .zetacored being mounted on a volume
  • Loading branch information
gartnera committed Aug 30, 2024
1 parent 495ffcd commit e9153a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ RUN go install github.com/zeta-chain/dl-pipe/cmd/dl-pipe@latest

FROM debian:bookworm AS base

RUN mkdir -p /root/.zetacored/cosmovisor/genesis/bin && \
ln -s /root/.zetacored/cosmovisor/genesis /root/.zetacored/cosmovisor/current

ENV PATH=/root/.zetacored/cosmovisor/current/bin/:${PATH}

RUN apt update && \
Expand Down
7 changes: 7 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ download_configs() {

install_genesis_zetacored() {
echo "Installing genesis zetacored"

# create the genesis bin path and symlink it to the current path
genesis_bin_path=".zetacored/cosmovisor/genesis/bin/"
mkdir -p $genesis_bin_path
current_path=".zetacored/cosmovisor/current"
ln -s "$genesis_bin_path" "$current_path"

if [[ -z $ZETACORED_BINARY_URL ]]; then
max_height=$($CURL "${ZETACHAIN_SNAPSHOT_METADATA_URL}" | jq -r '.snapshots[0].height')
echo "Getting latest passed upgrade plan before ${max_height}"
Expand Down

0 comments on commit e9153a8

Please sign in to comment.