git clone https://github.com/HemeraProtocol/hemera-indexer.git
or
git clone git@github.com:HemeraProtocol/hemera-indexer.git
Run Hemera Indexer
We recommend running from docker containers using the provided docker-compose.yaml . If you prefer running from source code, please check out Run from Source Code section below.
Run In Docker
1. Install Docker & Docker Compose
If you have trouble running the following commands, consider referring to the official docker installation guide for the latest instructions.
Alternatively, you might want to edit environment variables in docker-compose.yaml. Please check out the configuration manual on how to configure the environment variables.
vim docker-compose.yaml
Now, run the following command to spin up the containers.
sudo docker compose up
You should be able to see similar logs from your console that indicate Hemera Indexer is running properly.
[+] Running 2/0
✔ Container postgresql Created 0.0s
✔ Container hemera Created 0.0s
Attaching to hemera, postgresql
postgresql |
postgresql | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgresql |
postgresql | 2024-06-24 08:18:48.547 UTC [1] LOG: starting PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
postgresql | 2024-06-24 08:18:48.548 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgresql | 2024-06-24 08:18:48.549 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgresql | 2024-06-24 08:18:48.554 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgresql | 2024-06-24 08:18:48.564 UTC [27] LOG: database system was shut down at 2024-06-24 06:44:23 UTC
postgresql | 2024-06-24 08:18:48.575 UTC [1] LOG: database system is ready to accept connections
hemera | 2024-06-24 08:18:54,953 - root [INFO] - Using provider https://eth.llamarpc.com
hemera | 2024-06-24 08:18:54,953 - root [INFO] - Using debug provider https://eth.llamarpc.com
hemera | 2024-06-24 08:18:55,229 - alembic.runtime.migration [INFO] - Context impl PostgresqlImpl.
hemera | 2024-06-24 08:18:55,230 - alembic.runtime.migration [INFO] - Will assume transactional DDL.
hemera | 2024-06-24 08:18:55,278 - alembic.runtime.migration [INFO] - Context impl PostgresqlImpl.
hemera | 2024-06-24 08:18:55,278 - alembic.runtime.migration [INFO] - Will assume transactional DDL.
hemera | 2024-06-24 08:18:56,169 - root [INFO] - Current block 20160303, target block 20137200, last synced block 20137199, blocks to sync 1
hemera | 2024-06-24 08:18:56,170 - ProgressLogger [INFO] - Started work. Items to process: 1.
hemera | 2024-06-24 08:18:57,505 - ProgressLogger [INFO] - 1 items processed. Progress is 100%.
hemera | 2024-06-24 08:18:57,506 - ProgressLogger [INFO] - Finished work. Total items processed: 1. Took 0:00:01.336310.
hemera | 2024-06-24 08:18:57,529 - exporters.postgres_item_exporter [INFO] - Exporting items to table block_ts_mapper, blocks end, Item count: 2, Took 0:00:00.022562
hemera | 2024-06-24 08:18:57,530 - ProgressLogger [INFO] - Started work.
Run From Source Code
1. Install Python3 and pip
Skip this step if you already have both installed.