-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose-indexer-template.yml
65 lines (60 loc) · 1.76 KB
/
docker-compose-indexer-template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3.4"
services:
db:
image: postgres:12
restart: always
volumes:
- /var/lib/postgresql/data
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: indexer-db
indexer:
image: subsquid/hydra-indexer:${INDEXER_VERSION}
restart: unless-stopped
env_file:
- .indexer.env
environment:
- INDEXER_WORKERS=5
- DB_NAME=indexer-db
- DB_HOST=db
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- DB_PORT=${DB_PORT}
- REDIS_URI=redis://redis:6379/0
- DEBUG=index*
- BLOCK_HEIGHT=0 # statring block height
- WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
# uncomment to enable custom type definitions
# - TYPES_JSON=types.json
# - SPEC_TYPES=typesBundle.json
#volumes:
# - "<path to types.json on the host machine>:/home/hydra/packages/hydra-indexer/types.json"
# - "<path to typesBundle.json on the host machine>:/home/hydra/packages/hydra-indexer/typesBundle.json"
depends_on:
- db
command: >
sh -c "yarn db:bootstrap && yarn start:prod"
indexer-api-gateway:
image: subsquid/hydra-indexer-gateway:${INDEXER_VERSION}
restart: unless-stopped
env_file:
- .indexer.env
environment:
- WARTHOG_STARTER_DB_DATABASE=indexer-db
- WARTHOG_STARTER_DB_HOST=db
- WARTHOG_STARTER_DB_PASSWORD=${DB_PASS}
- WARTHOG_STARTER_DB_PORT=${DB_PORT}
- WARTHOG_STARTER_DB_USERNAME=${DB_USER}
- WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
- PORT=4000
ports:
- "${INDEXER_GATEWAY_PORT}:4000" #
depends_on:
- redis
- indexer
redis:
image: redis:6.0-alpine
restart: always
ports:
- "6379"