Skip to content

Commit dbe0d19

Browse files
committed
docs: update getting started
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 96a3b60 commit dbe0d19

File tree

1 file changed

+77
-11
lines changed

1 file changed

+77
-11
lines changed

README.md

Lines changed: 77 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,94 @@ integrated with [TAP](https://github.com/semiotic-ai/timeline-aggregation-protoc
77
which is a fast, efficient, and trustless unidirectional micro-payments system.
88

99
---
10-
## Getting started
10+
## Getting Started
1111

12-
### Docker images
13-
We build Docker images for commit, pull request and release.
12+
This section provides guidance for building, configuring, and running `indexer-service-rs` and `indexer-tap-agent`.
1413

15-
You can use them by using xxxx:<tag>.
14+
### Docker Images
15+
16+
Pre-built Docker images are available for both `indexer-service-rs` and `indexer-tap-agent`. You can pull these images using the following commands:
17+
18+
- **Indexer Service:**
19+
```bash
20+
docker pull ghcr.io/graphprotocol/indexer-service-rs:<tag>
21+
```
22+
23+
- **TAP Agent:**
24+
```bash
25+
docker pull ghcr.io/graphprotocol/indexer-tap-agent:<tag>
26+
```
27+
28+
The `<tag>` corresponds to the current release version, which can be found in the [Releases Page](https://github.com/graphprotocol/indexer-rs/releases).
29+
30+
#### Tag Examples for Version X.Y.Z
31+
For version `X.Y.Z`, the available tags include:
32+
- `latest`
33+
- `vX.Y.Z`
34+
- `X.Y.Z`
35+
- `vX.Y`
36+
- `X.Y`
37+
- `vX`
38+
39+
Refer to the following badges for the latest release versions:
40+
| indexer-service-rs | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/indexer-rs?filter=indexer-service-rs-*)](https://github.com/graphprotocol/indexer-rs/releases?q=indexer-service-rs) |
41+
|---------------------|---------------------------------------------------------------------------------------------------------------------------|
42+
| indexer-tap-agent | [![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/indexer-rs?filter=indexer-tap-agent-*)](https://github.com/graphprotocol/indexer-rs/releases?q=indexer-tap-agent) |
43+
44+
---
1645

1746
### Building Locally
1847

19-
To build and run the project locally, use the following command:
48+
To build the services locally, ensure you have the latest version of Rust installed. No additional plugins are required.
2049

50+
#### Steps:
51+
1. Clone the repository:
2152
```bash
22-
$ cargo run -p indexer-service-rs -- --help
53+
git clone https://github.com/graphprotocol/indexer-rs.git && cd indexer-rs
54+
```
55+
56+
2. Build the binaries:
57+
- **Indexer Service:**
58+
```
59+
cargo build --release -p indexer-service-rs
60+
```
61+
- **TAP Agent:**
62+
```
63+
cargo build --release -p indexer-tap-agent
64+
```
65+
66+
3. The compiled binaries can be found in the `target/release/` directory:
67+
- `target/release/indexer-service-rs`
68+
- `target/release/indexer-tap-agent`
69+
70+
---
2371

24-
Usage: indexer-service-rs --config <FILE>
72+
### Configuration
2573

26-
Options:
27-
--config <FILE> Path to the configuration file.
28-
See https://github.com/graphprotocol/indexer-rs/tree/main/config for examples.
29-
-h, --help Print help
74+
The services require a configuration file provided through the `--config` flag during startup. A minimal example configuration is available at:
75+
- [Minimal Configuration Template](config/minimal-config-example.toml)
76+
77+
#### Steps:
78+
1. **Edit the Configuration:**
79+
Open the `minimal-config-example.toml` file and populate the required fields. Some fields must be configured with values from [this table](https://thegraph.com/docs/en/tap/#blockchain-addresses).
80+
81+
2. **Override with Environment Variables (Optional):**
82+
You can override configuration fields using environment variables. Use the prefix `INDEXER_`, and for nested fields, use double underscores `__`. For example:
83+
84+
```bash
85+
export INDEXER_SERVICE_SUBGRAPHS__NETWORK__QUERY_URL=<value>
3086
```
3187

88+
3. **Start the Service:**
89+
- **Indexer Service:**
90+
```bash
91+
target/release/indexer-service-rs --config config/minimal-config-example.toml
92+
```
93+
- **TAP Agent:**
94+
```bash
95+
target/release/indexer-tap-agent --config config/minimal-config-example.toml
96+
```
97+
3298
## Configuration
3399

34100
All configuration is managed through a TOML file. Below are examples of configuration templates to help you get started:

0 commit comments

Comments
 (0)