Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
parametrize algod token
  • Loading branch information
shiqizng committed Feb 14, 2022
commit 5256525e5d9188d80f43b57a0dda48404f562d42
3 changes: 1 addition & 2 deletions monitoring/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DB_CONNECTION = "host=indexer-db port=5432 user=algorand password=algorand dbname=indexer_db sslmode=disable"
ALGOD_NET = https://node-archival-testnet.internal.aws.algodev.network:443
DB_CONNECTION = "host=indexer-db port=5432 user=algorand password=algorand dbname=indexer_db sslmode=disable"
2 changes: 1 addition & 1 deletion monitoring/Dockerfile-indexer
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ CMD ["/bin/sh", "-c", "\
-P \"${CONNECTION_STRING}\" \
--metrics-mode VERBOSE \
--algod-net \"${ALGOD_NET}\" \
--algod-token YddOUGbAjHLr1uPZtZwHOvMDmXvR1Zvw1f3Roj2PT1ufenXbNyIxIz0IeznrLbDsF"]
--algod-token ${ALGOD_TOKEN}"]
2 changes: 1 addition & 1 deletion monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
A monitoring dashboard displaying indexer performance metrics.

### To start a monitoring dashboard
Configurable env vars, `DB_CONNECTION` and `ALGOD_NET`. The default values are set in `.env`.
Configurable env vars, `DB_CONNECTION`, `ALGOD_NET` and `ALGOD_TOKEN`. The defaults are set in `.env`. User must provide a valid `ALGOD_NET` and `ALGOD_TOKEN` pair.

if indexer is not already running, start all services in `docker-compose.yml`

Expand Down
1 change: 1 addition & 0 deletions monitoring/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
PORT: 8888
CONNECTION_STRING: ${DB_CONNECTION}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need the .env file for the default, because the DB credentials are defined in this file:

Suggested change
CONNECTION_STRING: ${DB_CONNECTION}
CONNECTION_STRING: "${DB_CONNECTION:-host=indexer-db port=5432 user=algorand password=algorand dbname=indexer_db sslmode=disable}"```

ALGOD_NET: "${ALGOD_NET}"
ALGOD_TOKEN: "${ALGOD_TOKEN}"
ports:
- 8888:8888
depends_on:
Expand Down