Skip to content

Commit

Permalink
Merge pull request #77 from verim-id/bugfix/various
Browse files Browse the repository at this point in the history
Bugfix/various
  • Loading branch information
askolesov authored Jul 8, 2021
2 parents c724452 + 96005bb commit dc3f2c7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions ci/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ COPY --from=builder /go/bin/verim-noded /bin
COPY ci/docker/node-runner.sh /bin/node-runner
RUN chmod +x /bin/node-runner

RUN useradd --create-home --shell /bin/bash --uid 1000 verim
RUN groupadd --gid 1000 verim && \
useradd --create-home --shell /bin/bash --uid 1000 --gid verim verim

WORKDIR /home/verim
USER verim

VOLUME /root/.verim-noded
VOLUME /home/verim/.verimnode
EXPOSE 26656 26657
STOPSIGNAL SIGTERM

Expand Down
2 changes: 1 addition & 1 deletion ci/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Usage:

```
docker run -it --rm --entrypoint node-runner -e NODE_MONIKER=<moniker> -e GENESIS="<content>" -e NODE_KEY="<content>" -e PRIV_VALIDATOR_KEY="<content>" verim-node
```
```
11 changes: 9 additions & 2 deletions ci/docker/node-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ set -euox pipefail
NODE_HOME="$HOME/.verimnode"


# Init config directory
verim-noded init $NODE_MONIKER
# Init node config directory
if [ ! -d "${NODE_HOME}" ]
then
echo "Node home not found. Initializing."
verim-noded init $NODE_MONIKER
else
echo "Node home exists. Skipping initialization."
fi


# Update configs
echo "$GENESIS" | base64 --decode > $NODE_HOME/config/genesis.json
Expand Down

0 comments on commit dc3f2c7

Please sign in to comment.