Skip to content
Snippets Groups Projects
Select Git revision
  • 1cf65df00d90e0da47d5e0d0251a8baf8c056c28
  • master default protected
  • network/gtest-1000 protected
  • upgradable-multisig
  • runtime/gtest-1000
  • network/gdev-800 protected
  • cgeek/issue-297-cpu
  • gdev-800-tests
  • update-docker-compose-rpc-squid-names
  • fix-252
  • 1000i100-test
  • hugo/tmp-0.9.1
  • network/gdev-803 protected
  • hugo/endpoint-gossip
  • network/gdev-802 protected
  • hugo/distance-precompute
  • network/gdev-900 protected
  • tuxmain/anonymous-tx
  • debug/podman
  • hugo/195-doc
  • hugo/195-graphql-schema
  • gtest-1000-0.11.0 protected
  • gtest-1000 protected
  • gdev-900-0.10.1 protected
  • gdev-900-0.10.0 protected
  • gdev-900-0.9.2 protected
  • gdev-800-0.8.0 protected
  • gdev-900-0.9.1 protected
  • gdev-900-0.9.0 protected
  • gdev-803 protected
  • gdev-802 protected
  • runtime-801 protected
  • gdev-800 protected
  • runtime-800-bis protected
  • runtime-800 protected
  • runtime-800-backup protected
  • runtime-701 protected
  • runtime-700 protected
  • runtime-600 protected
  • runtime-500 protected
  • v0.4.1 protected
41 results

docker-distance-entrypoint

Blame
  • docker-distance-entrypoint 759 B
    #!/bin/bash
    
    # Custom startup if a first argument is present and is equal to '--'
    # then we just run duniter with the provided arguments (but the '--')
    # without applying all the automated configuration below
    if [ "$1" = -- ]; then
      shift
      distance-oracle "$@"
    else
      ORACLE_RESULT_DIR="${ORACLE_RESULT_DIR:-/distance}"
      ORACLE_EXECUTION_INTERVAL="${ORACLE_EXECUTION_INTERVAL:-1800}"
      ORACLE_RPC_URL="${ORACLE_RPC_URL:-ws://127.0.0.1:9944}"
      ORACLE_LOG_LEVEL="${ORACLE_LOG_LEVEL:-info}"
    
      while [ true ]; do
        distance-oracle --evaluation-result-dir "$ORACLE_RESULT_DIR" --rpc-url "$ORACLE_RPC_URL" --log "$ORACLE_LOG_LEVEL"
        echo "Waiting $ORACLE_EXECUTION_INTERVAL seconds before next execution..."
        sleep $ORACLE_EXECUTION_INTERVAL
      done
    fi