-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdocker-compose.worker.yaml
44 lines (40 loc) · 1.06 KB
/
docker-compose.worker.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
version: '3.9'
x-indexer-environment: &indexer-environment
POSTGRES_DIALECT: ${POSTGRES_DIALECT:-postgresql+asyncpg}
POSTGRES_HOST: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_DBNAME: ton_index
POSTGRES_DBROOT: /tondb
services:
index-worker:
build:
context: ton-index-cpp
dockerfile: Dockerfile
secrets:
- postgres_password
volumes:
- /var/ton-work/db:/tondb
# - /zpool/ton-work/db:/tondb
# - /zpool/ton-work-testnet/db:/tondb
environment: *indexer-environment
deploy:
mode: replicated
replicas: 1
placement:
constraints:
- "node.labels.${TONCENTER_ENV:?}.indexer-cpp.worker==true"
networks:
internal:
command: --from ${TON_WORKER_FROM:-1}
restart: unless-stopped
networks:
internal:
attachable: true
external: false
driver_opts:
com.docker.network.driver.mtu: 1350
secrets:
postgres_password:
file: ${POSTGRES_PASSWORD_FILE:-private/postgres_password}