From b2f3d6498b2bd84b722bde2e6005e22d0747888a Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Fri, 10 Jun 2022 09:01:19 -0400 Subject: [PATCH] Utilize config file for ipld-eth-beacon --- config/cicd/boot.ipld-eth-beacon-indexer.json | 40 +++++++++++++++++++ ...xample.ipld-eth-beacon-indexer-config.json | 2 +- entrypoint.sh | 25 +----------- 3 files changed, 43 insertions(+), 24 deletions(-) create mode 100644 config/cicd/boot.ipld-eth-beacon-indexer.json rename example.ipld-eth-beacon-indexer-config.json => config/example.ipld-eth-beacon-indexer-config.json (96%) diff --git a/config/cicd/boot.ipld-eth-beacon-indexer.json b/config/cicd/boot.ipld-eth-beacon-indexer.json new file mode 100644 index 0000000..b10cc13 --- /dev/null +++ b/config/cicd/boot.ipld-eth-beacon-indexer.json @@ -0,0 +1,40 @@ +{ + "db": { + "address": "ipld-eth-beacon-db", + "password": "password", + "port": 5432, + "username": "vdbm", + "name": "vulcanize_testing", + "driver": "PGX" + }, + "bc": { + "address": "lighthouse", + "port": 5052, + "type": "lighthouse", + "bootRetryInterval": 30, + "bootMaxRetry": 5, + "maxHistoricProcessWorker": 2, + "connectionProtocol": "http", + "uniqueNodeIdentifier": 100, + "checkDb": true + }, + "t": { + "skipSync": true + }, + "log": { + "level": "debug", + "output": true, + "file": "./ipld-eth-beacon-indexer.log", + "format": "json" + }, + "kg": { + "increment": 10000, + "processKnownGaps": true, + "maxKnownGapsWorker": 2 + }, + "pm": { + "address": "localhost", + "port": 9000, + "metrics": true + } +} diff --git a/example.ipld-eth-beacon-indexer-config.json b/config/example.ipld-eth-beacon-indexer-config.json similarity index 96% rename from example.ipld-eth-beacon-indexer-config.json rename to config/example.ipld-eth-beacon-indexer-config.json index eaf06af..7481284 100644 --- a/example.ipld-eth-beacon-indexer-config.json +++ b/config/example.ipld-eth-beacon-indexer-config.json @@ -8,7 +8,7 @@ "driver": "PGX" }, "bc": { - "address": "10.203.8.51", + "address": "localhost", "port": 5052, "type": "lighthouse", "bootRetryInterval": 30, diff --git a/entrypoint.sh b/entrypoint.sh index 8477d08..13da8da 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,30 +3,9 @@ sleep 10 echo "Starting ipld-eth-beacon-indexer" -echo /root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --db.address $DB_ADDRESS \ - --db.password $DB_PASSWORD \ - --db.port $DB_PORT \ - --db.username $DB_USER \ - --db.name $DB_NAME \ - --db.driver $DB_DRIVER \ - --bc.address $BC_ADDRESS \ - --bc.port $BC_PORT \ - --log.level $LOG_LEVEL\ - --t.skipSync=$SKIP_SYNC \ - --kg.increment $KNOWN_GAP_INCREMENT - -/root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --db.address $DB_ADDRESS \ - --db.password $DB_PASSWORD \ - --db.port $DB_PORT \ - --db.username $DB_USER \ - --db.name $DB_NAME \ - --db.driver $DB_DRIVER \ - --bc.address $BC_ADDRESS \ - --bc.port $BC_PORT \ - --log.level $LOG_LEVEL \ - --t.skipSync=$SKIP_SYNC \ - --kg.increment $KNOWN_GAP_INCREMENT +echo /root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json +/root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json rv=$? if [ $rv != 0 ]; then