Skip to content
Snippets Groups Projects
Commit b7b58b4a authored by Éloïs's avatar Éloïs
Browse files

doc: add a docker compose example to setup an hydra indexer

parent 1a2262a1
No related branches found
No related tags found
No related merge requests found
version: "3.4"
services:
db:
image: postgres:12
restart: always
volumes:
- /var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
duniter-1:
image: duniter/duniter-v2s:debug-sha-c305faab
restart: unless-stopped
ports:
- "9944:9944"
indexer:
image: subsquid/hydra-indexer:5
restart: unless-stopped
environment:
- WORKERS_NUMBER=1
- DB_NAME=indexer
- DB_HOST=db
- DB_USER=postgres
- DB_PASS=postgres
- DB_PORT=5432
- REDIS_URI=redis://redis:6379/0
- FORCE_HEIGHT=true
- BLOCK_HEIGHT=0 # starting block height
- WS_PROVIDER_ENDPOINT_URI=ws://duniter-1:9944/
depends_on:
- db
- redis
command: >
sh -c "yarn db:bootstrap && yarn start:prod"
indexer-gateway:
image: subsquid/hydra-indexer-gateway:5
restart: unless-stopped
depends_on:
- redis
- db
- indexer-status-service
- indexer
ports:
- "4010:8080"
environment:
- DEV_MODE=true
- DB_NAME=indexer
- DB_HOST=db
- DB_USER=postgres
- DB_PASS=postgres
- DB_PORT=5432
- HYDRA_INDEXER_STATUS_SERVICE=http://indexer-status-service:8081/status
indexer-status-service:
image: subsquid/hydra-indexer-status-service:5
restart: unless-stopped
depends_on:
- redis
environment:
REDIS_URI: redis://redis:6379/0
PORT: 8081
redis:
image: redis:6.0-alpine
restart: always
ports:
- "6379"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment