Skip to content

Commit

Permalink
Merge pull request #545 from chainbound/lore/fix/entrypoint
Browse files Browse the repository at this point in the history
fix(holesky): entrypoint logic to not replace envs when empty
  • Loading branch information
merklefruit authored Dec 11, 2024
2 parents bd329a3 + 42f68ed commit 3c7c8c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions bolt-sidecar/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use telemetry::TelemetryOpts;
/// Operating limits for commitments and constraints.
pub mod limits;
use limits::LimitsOpts;
use tracing::debug;

use crate::common::secrets::{BlsSecretKeyWrapper, EcdsaSecretKeyWrapper, JwtSecretConfig};

Expand Down Expand Up @@ -144,7 +143,6 @@ fn remove_empty_envs() -> eyre::Result<()> {
for item in env::vars() {
let (key, val) = item;
if val.trim().is_empty() {
debug!("removing empty env var: {}", key);
std::env::remove_var(key)
}
}
Expand Down
10 changes: 5 additions & 5 deletions testnets/holesky/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ source .env
# Override some of the environment variables provided by the user, even if
# provided via .env file, so that the volume mounts work as expected.
#
# The "+" syntax replaces the environment variable with the alternate valuee
# only if set.
# The ":+" syntax replaces the environment variable with the alternate value
# only if set _and_ not empty.
# Reference: https://docs.docker.com/compose/how-tos/environment-variables/variable-interpolation/#interpolation-syntax
#
# Ensure these environment variables are either empty or set with the
# alternative values, overriding what's provided with the `--env-file` flag in
# the Docker Compose file and matching the volume mounts.
export BOLT_SIDECAR_DELEGATIONS_PATH="${BOLT_SIDECAR_DELEGATIONS_PATH+/etc/delegations.json}"
export BOLT_SIDECAR_KEYSTORE_PATH="${BOLT_SIDECAR_KEYSTORE_PATH+/etc/keystore}"
export BOLT_SIDECAR_KEYSTORE_SECRETS_PATH="${BOLT_SIDECAR_KEYSTORE_SECRETS_PATH+/etc/secrets}"
export BOLT_SIDECAR_DELEGATIONS_PATH="${BOLT_SIDECAR_DELEGATIONS_PATH:+/etc/delegations.json}"
export BOLT_SIDECAR_KEYSTORE_PATH="${BOLT_SIDECAR_KEYSTORE_PATH:+/etc/keystore}"
export BOLT_SIDECAR_KEYSTORE_SECRETS_PATH="${BOLT_SIDECAR_KEYSTORE_SECRETS_PATH:+/etc/secrets}"

./bolt-sidecar

0 comments on commit 3c7c8c0

Please sign in to comment.