From 42466c6e91bb7c59410249129caa5008a4713cf4 Mon Sep 17 00:00:00 2001 From: Sebastian <379651+czarly@users.noreply.github.com> Date: Sun, 2 Feb 2025 07:58:57 +0100 Subject: [PATCH] generate the nodekey --- erigon-linea.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/erigon-linea.yml b/erigon-linea.yml index 0baf215e..210b25c4 100644 --- a/erigon-linea.yml +++ b/erigon-linea.yml @@ -1,9 +1,29 @@ version: '3.1' services: + erigon-linea-init: + image: alpine:latest + entrypoint: ["/bin/sh", "-c"] + command: + - | + apk add --no-cache openssl xxd; + mkdir -p /config; + if [ ! -f /config/nodekey ]; then + echo "Generating new Geth node key..."; + openssl rand 32 | xxd -p -c 32 | tr -d '\n' > /configs/mainnet/shared/nodekey; + echo "Node key generated: $(cat /config/nodekey)"; + else + echo "Node key already exists, skipping generation."; + fi + volumes: + - ./linea/shared:/configs/mainnet/shared + init: true + erigon-linea: image: erigontech/erigon:${ERIGON2_VERSION:-v2.61.0} user: root + depends_on: + - erigon-linea-init expose: - "51262" - "9090"