forked from bryanlabs/cosmos-indexer-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
71 lines (68 loc) · 1.77 KB
/
docker-compose.yaml
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
66
67
68
69
70
71
version: "3.9"
services:
postgres:
restart: "unless-stopped"
image: postgres:15-alpine
stop_grace_period: 1m
volumes:
- /etc/localtime:/etc/localtime:ro
- postgres:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
ports:
- 5432:5432/tcp
healthcheck:
test: ["CMD", "nc", "-z", "-v", "localhost", "5432"]
interval: 5s
timeout: 5s
retries: 5
networks:
default:
aliases:
- cosmos-indexer
indexer:
restart: "no"
build:
dockerfile: Dockerfile
user: cosmos-indexer
stop_grace_period: 10s
depends_on:
postgres:
condition: service_healthy
links:
- postgres
networks:
default:
aliases:
- cosmos-indexer
environment:
- EXTENDED_ARGS=""
- LOG_LEVEL="info"
command:
- /bin/sh
- -c
- |
cosmos-indexer index \
--log.pretty=${PRETTY_LOG} \
--log.level=${LOG_LEVEL} \
--base.index-transactions=${INDEX_TRANSACTIONS} \
--base.index-block-events=${INDEX_BLOCK_EVENTS} \
--base.start-block=${START_BLOCK} \
--base.end-block=${END_BLOCK} \
--base.throttling=${THROTTLING} \
--base.rpc-workers=${RPC_WORKERS} \
--base.reindex=${REINDEX} \
--base.reattempt-failed-blocks=false \
--probe.rpc=${RPC_URL} \
--probe.account-prefix=${ACCOUNT_PREFIX} \
--probe.chain-id=${CHAIN_ID} \
--probe.chain-name=${CHAIN_NAME} \
--database.host=postgres \
--database.database=${POSTGRES_DB} \
--database.user=${POSTGRES_USER} \
--database.password=${POSTGRES_PASSWORD} \
${EXTENDED_ARGS}
volumes:
postgres: