Skip to content

Commit

Permalink
chore: parse for local collector env DATA_MARKET_IN_REQUEST in build
Browse files Browse the repository at this point in the history
  • Loading branch information
anomit committed Nov 17, 2024
1 parent 90c168a commit cad6588
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
35 changes: 11 additions & 24 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,33 +119,20 @@ echo "Found SIGNER ACCOUNT ADDRESS ${SIGNER_ACCOUNT_ADDRESS}"
[ -n "$SLACK_REPORTING_URL" ] && echo "Found SLACK_REPORTING_URL ${SLACK_REPORTING_URL}"
[ -n "$POWERLOOM_REPORTING_URL" ] && echo "Found POWERLOOM_REPORTING_URL ${POWERLOOM_REPORTING_URL}"

if [ -z "$CORE_API_PORT" ]; then
export CORE_API_PORT=8002
echo "CORE_API_PORT not found in .env, setting to default value ${CORE_API_PORT}"
else
echo "Found CORE_API_PORT ${CORE_API_PORT}"
fi
[ -z "${CORE_API_PORT}" ] && export CORE_API_PORT=8002 && echo "CORE_API_PORT not found in .env, setting to default value ${CORE_API_PORT}"
[ -n "${CORE_API_PORT}" ] && echo "Found CORE_API_PORT ${CORE_API_PORT}"

if [ -z "$LOCAL_COLLECTOR_PORT" ]; then
export LOCAL_COLLECTOR_PORT=50051
echo "LOCAL_COLLECTOR_PORT not found in .env, setting to default value ${LOCAL_COLLECTOR_PORT}"
else
echo "Found LOCAL_COLLECTOR_PORT ${LOCAL_COLLECTOR_PORT}"
fi
[ -z "${LOCAL_COLLECTOR_PORT}" ] && export LOCAL_COLLECTOR_PORT=50051 && echo "LOCAL_COLLECTOR_PORT not found in .env, setting to default value ${LOCAL_COLLECTOR_PORT}"
[ -n "${LOCAL_COLLECTOR_PORT}" ] && echo "Found LOCAL_COLLECTOR_PORT ${LOCAL_COLLECTOR_PORT}"

if [ "$MAX_STREAM_POOL_SIZE" ]; then
echo "Found MAX_STREAM_POOL_SIZE ${MAX_STREAM_POOL_SIZE}";
else
export MAX_STREAM_POOL_SIZE=1024
echo "MAX_STREAM_POOL_SIZE not found in .env, setting to default value ${MAX_STREAM_POOL_SIZE}";
fi
[ -z "${MAX_STREAM_POOL_SIZE}" ] && export MAX_STREAM_POOL_SIZE=1024 && echo "MAX_STREAM_POOL_SIZE not found in .env, setting to default value ${MAX_STREAM_POOL_SIZE}"
[ -n "${MAX_STREAM_POOL_SIZE}" ] && echo "Found MAX_STREAM_POOL_SIZE ${MAX_STREAM_POOL_SIZE}"

if [ "$STREAM_POOL_HEALTH_CHECK_INTERVAL" ]; then
echo "Found STREAM_POOL_HEALTH_CHECK_INTERVAL ${STREAM_POOL_HEALTH_CHECK_INTERVAL}";
else
export STREAM_POOL_HEALTH_CHECK_INTERVAL=600
echo "STREAM_POOL_HEALTH_CHECK_INTERVAL not found in .env, setting to default value ${STREAM_POOL_HEALTH_CHECK_INTERVAL}";
fi
[ -z "${STREAM_POOL_HEALTH_CHECK_INTERVAL}" ] && export STREAM_POOL_HEALTH_CHECK_INTERVAL=600 && echo "STREAM_POOL_HEALTH_CHECK_INTERVAL not found in .env, setting to default value ${STREAM_POOL_HEALTH_CHECK_INTERVAL}"
[ -n "${STREAM_POOL_HEALTH_CHECK_INTERVAL}" ] && echo "Found STREAM_POOL_HEALTH_CHECK_INTERVAL ${STREAM_POOL_HEALTH_CHECK_INTERVAL}"

[ -z "${DATA_MARKET_IN_REQUEST}" ] && export DATA_MARKET_IN_REQUEST=false && echo "DATA_MARKET_IN_REQUEST not found in .env, setting to default value ${DATA_MARKET_IN_REQUEST}"
[ -n "${DATA_MARKET_IN_REQUEST}" ] && echo "Found DATA_MARKET_IN_REQUEST ${DATA_MARKET_IN_REQUEST}"

# check if ufw command exists
if command -v ufw &> /dev/null; then
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
- BLOCK_TIME=$BLOCK_TIME
- MAX_STREAM_POOL_SIZE=$MAX_STREAM_POOL_SIZE
- STREAM_POOL_HEALTH_CHECK_INTERVAL=$STREAM_POOL_HEALTH_CHECK_INTERVAL
- DATA_MARKET_IN_REQUEST=$DATA_MARKET_IN_REQUEST
networks:
- custom_network
restart: on-failure:10
Expand Down

0 comments on commit cad6588

Please sign in to comment.