Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker: Fix ADMIN_TOKEN and add missing variables to echo statements. #5357

Merged
merged 2 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions docker/files/run/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ function configure_data_dir() {
algocfg -d . set -p EndpointAddress -v "0.0.0.0:${ALGOD_PORT}"

# check for token overrides
if [ "$TOKEN" != "" ]; then
for dir in ${ALGORAND_DATA}/../*/; do
echo "$TOKEN" > "$dir/algod.token"
done
fi
if [ "$ADMIN_TOKEN" != "" ]; then
echo "$ADMIN_TOKEN" >algod.admin.token
fi
for dir in ${ALGORAND_DATA}/../*/; do
if [ "$TOKEN" != "" ]; then
echo "$TOKEN" > "$dir/algod.token"
fi
if [ "$ADMIN_TOKEN" != "" ]; then
echo "$ADMIN_TOKEN" > "$dir/algod.admin.token"
fi
done

# configure telemetry
if [ "$TELEMETRY_NAME" != "" ]; then
Expand Down Expand Up @@ -184,13 +184,17 @@ function start_new_private_network() {
echo "Starting Algod Docker Container"
echo " ALGORAND_DATA: $ALGORAND_DATA"
echo " NETWORK: $NETWORK"
echo " ALGOD_PORT: $ALGOD_PORT"
echo " FAST_CATCHUP: $FAST_CATCHUP"
echo " PROFILE: $PROFILE"
echo " DEV_MODE: $DEV_MODE"
echo " START_KMD: ${START_KMD:-"Not Set"}"
echo " FAST_CATCHUP: $FAST_CATCHUP"
echo " TOKEN: ${TOKEN:-"Not Set"}"
echo " ADMIN_TOKEN: ${ADMIN_TOKEN:-"Not Set"}"
echo " KMD_TOKEN: ${KMD_TOKEN:-"Not Set"}"
echo " TELEMETRY_NAME: $TELEMETRY_NAME"
echo " START_KMD: ${START_KMD:-"Not Set"}"
echo " NUM_ROUNDS: $NUM_ROUNDS"
echo " PEER_ADDRESS: $PEER_ADDRESS"
echo " ALGOD_PORT: $ALGOD_PORT"

# If data directory is initialized, start existing environment.
if [ -f "$ALGORAND_DATA/../network.json" ]; then
Expand Down