-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: run script and readme updates (#84)
* [README/run] Update the run.sh scripts and README to allow configuration in one single .env file * [justfile] add run-* commands * Remove references to CHAIN_ID
- Loading branch information
Showing
12 changed files
with
71 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
DATABASE_URL=postgres://postgres:password@postgres:5432/namada-indexer | ||
TENDERMINT_URL=http://host.docker.internal:27657 | ||
CHAIN_ID=local.82f9d1c42fdcadbb287ce393 | ||
CACHE_URL=redis://dragonfly:6379 | ||
WEBSERVER_PORT=5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ cp .env_sample .env | |
- Get a Namada RPC url | ||
- [Either create a local chain ](https://github.com/anoma/namada/blob/main/scripts/gen_localnet.py) | ||
- Or use a Public RPC | ||
- Change `CHAIN_ID` | ||
- Install [just](https://github.com/casey/just) | ||
- Run `just docker-run` | ||
|
||
|
@@ -41,7 +40,18 @@ cp .env_sample .env | |
- Get a Namada RPC url | ||
- [Either create a local chain ](https://github.com/anoma/namada/blob/main/scripts/gen_localnet.py) | ||
- Or use a Public RPC | ||
- Get a network `CHAIN_ID` | ||
- Create a `.env` file in the root of the project with the following content: | ||
```env | ||
DATABASE_URL=postgres://postgres:[email protected]:5435/namada-indexer | ||
TENDERMINT_URL=http://127.0.0.1:27657 | ||
``` | ||
(Change the values to match your setup) | ||
- For `webserver` only, you may also add the following to the `.env` file: | ||
```env | ||
CACHE_URL=redis://[email protected]:6379 | ||
PORT=5000 | ||
``` | ||
(Change the values to match your setup) | ||
- Use the `run.sh` script inside each package. Keep in mind that PoS package have to be run always while other service might not | ||
|
||
## Testing via seeder | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
cargo run -- --tendermint-url http://127.0.0.1:27657 --initial-query-retry-time 5 --database-url postgres://postgres:[email protected]:5435/namada-indexer | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run -- --initial-query-retry-time 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
|
||
cargo run -- --tendermint-url http://127.0.0.1:27657 --database-url postgres://postgres:[email protected]:5435/namada-indexer --sleep-for 15 | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run -- --sleep-for 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
|
||
cargo run -- --tendermint-url http://127.0.0.1:27657 --database-url postgres://postgres:[email protected]:5435/namada-indexer --sleep-for 15 | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run -- --sleep-for 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
|
||
cargo run -- --tendermint-url http://127.0.0.1:27657 --database-url postgres://postgres:[email protected]:5435/namada-indexer | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
|
||
cargo run -- --tendermint-url http://127.0.0.1:27657 --database-url postgres://postgres:[email protected]:5435/namada-indexer --sleep-for 15 | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run -- --sleep-for 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
|
||
cargo run -- --cargo-env development --tendermint-url http://127.0.0.1:27657 --database-url postgres://postgres:[email protected]:5435/indexer_local | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run -- --cargo-env development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
cargo run -- --database-url postgres://postgres:[email protected]:5435/namada-indexer --tendermint-url http://127.0.0.1:27657 | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
cargo run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
cargo run -- --database-url postgres://postgres:[email protected]:5435/namada-indexer --cache-url redis://[email protected]:6379 --tendermint-url http://127.0.0.1:27657 | ||
. ../.env | ||
export TENDERMINT_URL | ||
export DATABASE_URL | ||
export CACHE_URL | ||
export PORT | ||
cargo run |