From 9bd2fe7c7cfcd5f474f258e0700847b6bc6e070a Mon Sep 17 00:00:00 2001 From: Marc Font <36164126+Marketen@users.noreply.github.com> Date: Mon, 22 Jul 2024 09:52:34 +0200 Subject: [PATCH] update envs (#3) --- beacon-chain/Dockerfile | 11 ++++++----- beacon-chain/entrypoint.sh | 2 +- docker-compose.yml | 2 ++ validator/Dockerfile | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/beacon-chain/Dockerfile b/beacon-chain/Dockerfile index 806a0f1..f20f7e1 100644 --- a/beacon-chain/Dockerfile +++ b/beacon-chain/Dockerfile @@ -3,16 +3,17 @@ FROM sigp/lighthouse:${UPSTREAM_VERSION}-modern ARG NETWORK ARG STAKER_SCRIPTS_VERSION +ARG DATA_DIR -COPY jwtsecret.hex /jwtsecret -COPY entrypoint.sh /usr/local/bin/entrypoint.sh - -ENV JWT_SECRET_FILE=/jwtsecret \ - DATA_DIR=/root/.lighthouse \ +ENV JWT_FILE_PATH=/jwtsecret \ + DATA_DIR=${DATA_DIR} \ BEACON_API_PORT=3500 \ NETWORK=${NETWORK} \ STAKER_SCRIPTS_URL=https://github.com/dappnode/staker-package-scripts/releases/download/${STAKER_SCRIPTS_VERSION} +COPY jwtsecret.hex ${JWT_FILE_PATH} +COPY entrypoint.sh /usr/local/bin/entrypoint.sh + ADD ${STAKER_SCRIPTS_URL}/consensus_tools.sh /etc/profile.d/ RUN chmod +rx /usr/local/bin/entrypoint.sh /etc/profile.d/consensus_tools.sh diff --git a/beacon-chain/entrypoint.sh b/beacon-chain/entrypoint.sh index 18e7cfe..4b9daba 100755 --- a/beacon-chain/entrypoint.sh +++ b/beacon-chain/entrypoint.sh @@ -26,7 +26,7 @@ run_beacon() { --metrics-port 8008 \ --metrics-allow-origin "*" \ --execution-endpoint "${ENGINE_API_URL}" \ - --execution-jwt "${JWT_SECRET_FILE}" \ + --execution-jwt "${JWT_FILE_PATH}" \ ${EXTRA_OPTS} } diff --git a/docker-compose.yml b/docker-compose.yml index 4b569eb..230094a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: UPSTREAM_VERSION: v5.2.1 STAKER_SCRIPTS_VERSION: v0.1.0 BEACON_API_PORT: 3500 + DATA_DIR: /root/.lighthouse volumes: - "beacon-data:/root/.lighthouse" restart: unless-stopped @@ -22,6 +23,7 @@ services: args: UPSTREAM_VERSION: v5.2.1 STAKER_SCRIPTS_VERSION: v0.1.0 + DATA_DIR: /root/.lighthouse restart: unless-stopped # security_opt: # - "seccomp:unconfined" diff --git a/validator/Dockerfile b/validator/Dockerfile index d4da824..38c814b 100644 --- a/validator/Dockerfile +++ b/validator/Dockerfile @@ -3,13 +3,14 @@ FROM sigp/lighthouse:${UPSTREAM_VERSION}-modern ARG NETWORK ARG STAKER_SCRIPTS_VERSION +ARG DATA_DIR COPY security/api-token.txt /root/.lighthouse/validators/ COPY security/.secp-sk /root/.lighthouse/validators/ COPY entrypoint.sh /usr/local/bin ENV VALIDATOR_PORT=3500 \ - DATA_DIR=/root/.lighthouse \ + DATA_DIR=${DATA_DIR} \ NETWORK=${NETWORK} \ STAKER_SCRIPTS_URL=https://github.com/dappnode/staker-package-scripts/releases/download/${STAKER_SCRIPTS_VERSION}