-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose.events.yaml
57 lines (52 loc) · 1.39 KB
/
docker-compose.events.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
version: '3.9'
x-indexer-environment: &indexer-environment
POSTGRES_DIALECT:
POSTGRES_HOST:
POSTGRES_PORT:
POSTGRES_USER:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_DBNAME:
TON_INDEXER_API_ROOT_PATH:
TON_INDEXER_API_TITLE:
TON_INDEXER_TON_HTTP_API_ENDPOINT:
TON_INDEXER_REDIS_DSN: redis://event-cache:6379
services:
event-cache:
image: redis:latest
networks:
- internal
command: redis-server --maxclients 40000
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- "node.labels.${TONCENTER_ENV:?}.indexer-cpp.events==true"
event-classifier:
image: ${DOCKER_REGISTRY:-localhost:5000}/ton-index-event-classfier:${IMAGE_TAG:?}
build:
context: indexer
dockerfile: Dockerfile
secrets:
- postgres_password
command: python3 /app/event_classifier.py --pool-size ${TON_INDEXER_WORKERS:-8} --fetch-size 64000 --batch-size 2000
environment: *indexer-environment
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- "node.labels.${TONCENTER_ENV:?}.indexer-cpp.events==true"
networks:
internal:
networks:
internal:
attachable: true
external: false
driver_opts:
com.docker.network.driver.mtu: 1350
toncenter-global:
external: true
secrets:
postgres_password:
file: private/postgres_password