-
Notifications
You must be signed in to change notification settings - Fork 31
/
docker-compose.api.yaml
54 lines (50 loc) · 1.32 KB
/
docker-compose.api.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
version: '3.9'
x-indexer-environment: &indexer-environment
POSTGRES_DIALECT: ${POSTGRES_DIALECT:-postgresql}
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_IS_TESTNET:
services:
index-api-go:
image: ${DOCKER_REGISTRY:-localhost:5000}/ton-index-go:${IMAGE_TAG:?}
build:
context: ton-index-go
dockerfile: Dockerfile
secrets:
- postgres_password
command: -prefork -threads ${TON_INDEXER_WORKERS:-1}
init: true
ports:
- target: 8081
published: ${TON_INDEXER_API_PORT:-8081}
protocol: tcp
mode: host
environment: *indexer-environment
deploy:
mode: replicated
replicas: ${SWARM_REPLICAS:-1}
placement:
constraints:
- "node.labels.${TONCENTER_ENV:?}.indexer-cpp.api-go==true"
networks:
internal:
toncenter-global:
aliases:
- ${TONCENTER_ENV:?}-indexer-cpp-api-go
networks:
internal:
attachable: true
external: false
driver_opts:
com.docker.network.driver.mtu: 1350
toncenter-global:
external: true
secrets:
postgres_password:
file: ${POSTGRES_PASSWORD_FILE:-private/postgres_password}