-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yml
113 lines (109 loc) · 2.7 KB
/
docker-compose.yml
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: "3.5"
x-anton-service: &anton-service
image: "${IMAGE_NAME:-tonindexer/anton}:${IMAGE_TAG:-latest}"
networks:
- indexer_network
depends_on: &anton-deps
clickhouse:
condition: service_healthy
postgres:
condition: service_healthy
links:
- clickhouse
- postgres
environment: &anton-env
DB_CH_URL: "clickhouse://${DB_USERNAME}:${DB_PASSWORD}@clickhouse:9000/${DB_NAME}?sslmode=disable"
DB_PG_URL: "postgres://${DB_USERNAME}:${DB_PASSWORD}@postgres:5432/${DB_NAME}?sslmode=disable"
services:
indexer:
<<: *anton-service
depends_on:
<<: *anton-deps
migrations:
condition: service_completed_successfully
command: idx
environment:
<<: *anton-env
FROM_BLOCK: ${FROM_BLOCK}
WORKERS: ${WORKERS}
LITESERVERS: ${LITESERVERS}
DEBUG_LOGS: ${DEBUG_LOGS}
rescan:
<<: *anton-service
depends_on:
<<: *anton-deps
migrations:
condition: service_completed_successfully
command: rescan
environment:
<<: *anton-env
RESCAN_WORKERS: ${RESCAN_WORKERS}
RESCAN_SELECT_LIMIT: ${RESCAN_SELECT_LIMIT}
LITESERVERS: ${LITESERVERS}
DEBUG_LOGS: ${DEBUG_LOGS}
web:
<<: *anton-service
depends_on:
<<: *anton-deps
migrations:
condition: service_completed_successfully
ports:
- "8080:8080"
expose:
- "8080"
command: web
environment:
<<: *anton-env
LITESERVERS: ${LITESERVERS}
GIN_MODE: "release"
migrations:
<<: *anton-service
command: ["migrate", "up", "--init"]
clickhouse:
image: "clickhouse/clickhouse-server:22"
healthcheck:
test: wget --spider --no-verbose --tries=1 localhost:8123/ping || exit 1
interval: 5s
timeout: 5s
start_period: 60s
retries: 10
networks:
- indexer_network
volumes:
- idx_ch_data:/var/lib/clickhouse
expose:
- "9000"
- "8123"
ulimits:
nproc: 65535
nofile:
soft: 262144
hard: 262144
environment:
CLICKHOUSE_DB: "${DB_NAME}"
CLICKHOUSE_USER: "${DB_USERNAME}"
CLICKHOUSE_PASSWORD: "${DB_PASSWORD}"
postgres:
image: "postgres:15"
healthcheck:
test: pg_isready -U "${DB_USERNAME}" -d "${DB_NAME}" || exit 1
interval: 5s
timeout: 5s
start_period: 60s
retries: 10
networks:
- indexer_network
volumes:
- idx_pg_data:/var/lib/postgresql/data
expose:
- "5432"
environment:
PGDATA: /var/lib/postgresql/data/pgdata/
POSTGRES_DB: "${DB_NAME}"
POSTGRES_USER: "${DB_USERNAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
networks:
indexer_network:
volumes:
idx_ch_data:
idx_pg_data: