From 73e72904d30fbded37be7da361bb587f7ba29cf3 Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Sun, 2 Feb 2025 07:41:07 +0100 Subject: [PATCH] generate the nodekey --- fantom/Dockerfile-fullnode | 2 +- fantom/scripts/entrypoint-fullnode.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fantom/Dockerfile-fullnode b/fantom/Dockerfile-fullnode index 28ddabca..aecc58d2 100644 --- a/fantom/Dockerfile-fullnode +++ b/fantom/Dockerfile-fullnode @@ -2,7 +2,7 @@ FROM golang:1.19-alpine as builder # Install packages we need -RUN apk add --no-cache make gcc musl-dev linux-headers git +RUN apk add --no-cache make gcc musl-dev linux-headers git openssl # Make a folder to work in RUN mkdir /fantom diff --git a/fantom/scripts/entrypoint-fullnode.sh b/fantom/scripts/entrypoint-fullnode.sh index 12165613..3c443c2c 100644 --- a/fantom/scripts/entrypoint-fullnode.sh +++ b/fantom/scripts/entrypoint-fullnode.sh @@ -16,6 +16,8 @@ fi # uncomment the next line and do docker-compose build in case you have to try to fix the db after unclean shutdown etc. # opera --db.preset pbl-1 --datadir=$FANTOM_HOME db heal --experimental +[ -f /config/nodekey ] || openssl rand -hex 32 > /config/nodekey + opera \ --genesis=$FANTOM_HOME/mainnet-171200-no-history.g \ --port=19921 \