docker: adjust entrypoint (#2)

This commit is contained in:
Slava 2025-02-10 14:34:23 +02:00 committed by GitHub
parent e7caa08fae
commit f46e9837ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,7 +1,7 @@
#!/bin/bash
AUTOPUBLICIP=`curl http://ip.codex.storage`
# Variables
AUTOPUBLICIP="$(curl -s http://ip.codex.storage)"
LOGLEVEL=${CRAWLER_LOGLEVEL:-INFO}
PUBLICIP=${CRAWLER_PUBLICIP:-${AUTOPUBLICIP}}
METRICSADDRESS=${CRAWLER_METRICSADDRESS:-0.0.0.0}
@ -12,6 +12,9 @@ BOOTNODES=${CRAWLER_BOOTNODES:-testnet_sprs}
STEPDELAY=${CRAWLER_STEPDELAY:-1000}
REVISITDELAY=${CRAWLER_REVISITDELAY:-1440}
# Update CLI arguments
set -- "$@" --logLevel="${LOGLEVEL}" --publicIp="${PUBLICIP}" --metricsAddress="${METRICSADDRESS}" --metricsPort="${METRICSPORT}" --dataDir="${DATADIR}" --discoveryPort="${DISCPORT}" --bootNodes="${BOOTNODES}" --stepDelay="${STEPDELAY}" --revisitDelay="${REVISITDELAY}"
# Run
echo "Run Codex node"
exec "--logLevel=${LOGLEVEL} --publicIp=${PUBLICIP} --metricsAddress=${METRICSADDRESS} --metricsPort=${METRICSPORT} --dataDir=${DATADIR} --discoveryPort=${DISCPORT} --bootNodes=${BOOTNODES} --stepDelay=${STEPDELAY} --revisitDelay=${REVISITDELAY}"
echo "Run Codex Crawler"
exec "$@"