1
+ services :
2
+ postgres :
3
+ image : postgres:15
4
+ container_name : postgres
5
+ environment :
6
+ POSTGRES_USER : ${POSTGRES_USER}
7
+ POSTGRES_PASSWORD : ${POSTGRES_PASSWORD}
8
+ POSTGRES_DB : ${POSTGRES_DB}
9
+ restart : always
10
+ ports :
11
+ - " 5432:5432"
12
+ volumes :
13
+ - pg_data:/var/lib/postgresql/data
14
+ - ./init/:/docker-entrypoint-initdb.d/
15
+ healthcheck :
16
+ test : [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER}" ]
17
+ interval : 10s
18
+ timeout : 5s
19
+ retries : 5
20
+
21
+ graphql-engine :
22
+ image : hasura/graphql-engine:v2.43.0
23
+ ports :
24
+ - " 8080:8080"
25
+ restart : always
26
+ environment :
27
+ HASURA_GRAPHQL_METADATA_DATABASE_URL : postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/hasura_metadata
28
+ HASURA_GRAPHQL_DATABASE_URL : postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
29
+ HASURA_GRAPHQL_ENABLE_CONSOLE : " true"
30
+ HASURA_GRAPHQL_DEV_MODE : " true"
31
+ HASURA_GRAPHQL_ENABLED_LOG_TYPES : startup, http-log, webhook-log, websocket-log, query-log
32
+ depends_on :
33
+ postgres :
34
+ condition : service_healthy
35
+
36
+ storage :
37
+ container_name : gcs
38
+ image : fsouza/fake-gcs-server
39
+ restart : always
40
+ ports :
41
+ - " 9184:9184"
42
+ volumes :
43
+ - storage:/storage/${CHAIN}-local-informative-indexer-large-block-results
44
+ # - storage:/storage/${CHAIN}-local-core-informative-data-backup
45
+ command : -scheme http -port 9184
46
+
47
+ zookeeper :
48
+ image : confluentinc/cp-zookeeper
49
+ hostname : zookeeper
50
+ container_name : zookeeper
51
+ healthcheck :
52
+ test : nc -z localhost 2181 || exit -1
53
+ interval : 10s
54
+ timeout : 5s
55
+ retries : 3
56
+ ports :
57
+ - " 2181:2181"
58
+ environment :
59
+ ZOOKEEPER_CLIENT_PORT : 2181
60
+ ZOOKEEPER_TICK_TIME : 2000
61
+
62
+ broker :
63
+ image : confluentinc/cp-kafka
64
+ hostname : broker
65
+ container_name : broker
66
+ depends_on :
67
+ - zookeeper
68
+ healthcheck :
69
+ test : kafka-topics --bootstrap-server broker:29092 --list
70
+ interval : 30s
71
+ timeout : 10s
72
+ retries : 3
73
+ ports :
74
+ - " 29092:29092"
75
+ - " 9092:9092"
76
+ environment :
77
+ KAFKA_BROKER_ID : 1
78
+ KAFKA_ZOOKEEPER_CONNECT : ' zookeeper:2181'
79
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
80
+ KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
81
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
82
+ KAFKA_TRANSACTION_STATE_LOG_MIN_ISR : 1
83
+ KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR : 1
84
+ KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS : 0
85
+ KAFKA_SOCKET_REQUEST_MAX_BYTES : 500000000
86
+ KAFKA_MESSAGE_MAX_BYTES : 500000000
87
+ KAFKA_REPLICA_FETCH_MAX_BYTES : 500000000
88
+
89
+ sweeper :
90
+ build :
91
+ context : ../
92
+ dockerfile : dockerfiles/Dockerfile.informative
93
+ container_name : sweeper
94
+ environment :
95
+ RPC_ENDPOINTS : ' {"rpcs":[{"url": "https://rpc.testnet.initia.xyz"}]}'
96
+ BOOTSTRAP_SERVER : broker:29092
97
+ DB_CONNECTION_STRING : postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
98
+ BLOCK_RESULTS_TOPIC : ${CHAIN}-local-informative-indexer-block-results-messages
99
+ CHAIN : ${CHAIN}
100
+ ENVIRONMENT : ${ENVIRONMENT}
101
+ CLAIM_CHECK_BUCKET : ${CHAIN}-local-informative-indexer-large-block-results
102
+ depends_on :
103
+ postgres :
104
+ condition : service_healthy
105
+ broker :
106
+ condition : service_healthy
107
+ command : [ "/informative-indexer.bin", "sweep" ]
108
+
109
+ flusher :
110
+ build :
111
+ context : ../
112
+ dockerfile : dockerfiles/Dockerfile.informative
113
+ container_name : flusher
114
+ environment :
115
+ BOOTSTRAP_SERVER : broker:29092
116
+ BLOCK_RESULTS_TOPIC : ${CHAIN}-local-informative-indexer-block-results-messages
117
+ BLOCK_RESULTS_CONSUMER_GROUP : ${CHAIN}-local-informative-indexer-flusher
118
+ BLOCK_RESULTS_CLAIM_CHECK_BUCKET : ${CHAIN}-local-informative-indexer-large-block-results
119
+ CLAIM_CHECK_THRESHOLD_IN_MB : 1
120
+ DB_CONNECTION_STRING : postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
121
+ CHAIN : ${CHAIN}
122
+ ENVIRONMENT : ${ENVIRONMENT}
123
+ ID : 1
124
+ depends_on :
125
+ postgres :
126
+ condition : service_healthy
127
+ broker :
128
+ condition : service_healthy
129
+ command : [ "/informative-indexer.bin", "flush" ]
130
+
131
+ # prunner:
132
+ # build:
133
+ # context: ../
134
+ # dockerfile: dockerfiles/Dockerfile.informative
135
+ # container_name: prunner
136
+ # environment:
137
+ # DB_CONNECTION_STRING: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
138
+ # BACKUP_BUCKET_NAME: ${CHAIN}-local-core-informative-data-backup
139
+ # BACKUP_FILE_PREFIX: events
140
+ # PRUNING_KEEP_BLOCK: 10
141
+ # PRUNING_INTERVAL: 1
142
+ # CHAIN: ${CHAIN}
143
+ # ENVIRONMENT: ${ENVIRONMENT}
144
+ # depends_on:
145
+ # - sweeper
146
+ # - flusher
147
+ # command: [ "/informative-indexer.bin", "prune" ]
148
+
149
+ volumes :
150
+ pg_data :
151
+ storage:
0 commit comments