Skip to content

Commit

Permalink
fix(docker): solve issues with specifying config file path
Browse files Browse the repository at this point in the history
  • Loading branch information
aesedepece committed Nov 11, 2024
1 parent a8872c6 commit dd808bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docker/witnet-rust/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PUBLIC_ADDR_DISCOVERY=${PUBLIC_ADDR_DISCOVERY:-"true"}
LOG_LEVEL=${LOG_LEVEL:-"info"}

# Run the migrator (e.g. move RocksDB data from "./witnet" into "./witnet/storage")
./migrator.sh
./migrator.sh $@

# Change directory into the file system root so that all paths are absolute when using "docker exec"
cd /
Expand All @@ -52,11 +52,12 @@ cd /
while true; do
# Run the public address detector if enabled
if [[ "$PUBLIC_ADDR_DISCOVERY" == "true" ]]; then
/tmp/ip_detector.sh
/tmp/ip_detector.sh $@
fi

# Run the node itself, using configuration from the default directory and passing down any arguments that may be
# appended when running "docker run"
RUST_LOG=witnet=$LOG_LEVEL /tmp/witnet-raw -c "$CONFIG_FILE" "$COMMAND" || echo "$ERROR_BANNER"
echo "Running as 'RUST_LOG=witnet=$LOG_LEVEL /tmp/witnet-raw -c \"$CONFIG_FILE\" $COMMAND || echo \"$ERROR_BANNER\"'"
RUST_LOG=witnet=$LOG_LEVEL /tmp/witnet-raw -c "$CONFIG_FILE" $COMMAND || echo "$ERROR_BANNER"
sleep 30
done
2 changes: 1 addition & 1 deletion docker/witnet-rust/testnet-1/witnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ data_request_max_retrievals_per_epoch = 30
data_request_timeout_milliseconds = 2000
# Path for the `genesis_block.json` file that contains the initial wit allocations that need to be built into the first
# block in the block chain.
genesis_path = ".witnet/config/testnet-1/genesis_block.json"
genesis_path = "/tmp/testnet-1/genesis_block.json"
# `mint_external_address` and `mint_external_percentage` enable splitting the mint reward between the node's
# own address and an "external" address, e.g. a the address of a wallet. `mint_external_percentage` indicates
# the percentage of the block rewards that will be assigned to `mint_external_address` (50% by default)
Expand Down

0 comments on commit dd808bd

Please # to comment.