forked from DashNode-Org/dashtec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
297 lines (284 loc) · 8.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
297 lines (284 loc) · 8.65 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
version: "3.8"
services:
web:
build:
context: .
dockerfile: apps/web/Dockerfile
args:
NETWORK: mainnet
image: dashtec-web:latest
container_name: dashtec-web
ports:
- "${WEB_PORT:-3000}:3000"
env_file:
- apps/web/.env.mainnet
environment:
DATABASE_URL: postgresql://dashtec:dashtec@${DB_HOST:-postgres-mainnet}:5432/dashtec
REDIS_URL: redis://:dashtec@${REDIS_HOST:-redis-mainnet}:6379
DATABASE_URL_REPLICA: postgresql://dashtec:dashtec@${DB_HOST:-postgres-mainnet}:5432/dashtec
NEXT_SENTINEL_URL: ${NEXT_SENTINEL_URL}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
profiles:
- mainnet
indexer-ponder:
build:
context: .
dockerfile: packages/indexer-ponder/Dockerfile
image: dashtec-indexer-ponder:latest
container_name: dashtec-indexer-ponder
ports:
- "${PONDER_PORT:-42069}:42069"
env_file:
- packages/indexer-ponder/.env.mainnet
environment:
DATABASE_SCHEMA: ponder_prod
DATABASE_URL: postgresql://dashtec:dashtec@${DB_HOST:-postgres-mainnet}:5432/dashtec
REDIS_URL: redis://:dashtec@${REDIS_HOST:-redis-mainnet}:6379
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:42069/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
profiles:
- mainnet
indexer-custom:
build:
context: .
dockerfile: packages/indexer-custom/Dockerfile
image: dashtec-indexer-custom:latest
container_name: dashtec-indexer-custom
# Default command runs all collectors (see Dockerfile CMD)
ports:
- "${COLLECTOR_VALIDATOR_STATS_PORT:-4000}:4000"
- "${COLLECTOR_VALIDATOR_LIST_PORT:-4001}:4001"
- "${COLLECTOR_EPOCH_INTEGRITY_PORT:-4002}:4002"
- "${COLLECTOR_VALIDATOR_MIGRATION_PORT:-4003}:4003"
- "${COLLECTOR_PROVIDER_LIST_PORT:-4004}:4004"
env_file:
- packages/indexer-custom/.env.mainnet
environment:
DATABASE_URL: postgresql://dashtec:dashtec@${DB_HOST:-postgres-mainnet}:5432/dashtec
DATABASE_READ_REPLICA_URL: postgresql://dashtec:dashtec@${DB_HOST:-postgres-mainnet}:5432/dashtec
REDIS_URL: redis://:dashtec@${REDIS_HOST:-redis-mainnet}:6379
VALIDATOR_STATS_RPC_URL: ${VALIDATOR_STATS_RPC_URL}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
profiles:
- mainnet
materializer:
build:
context: .
dockerfile: packages/materializer/Dockerfile
image: dashtec-materializer:latest
container_name: dashtec-materializer
env_file:
- packages/materializer/.env.mainnet
environment:
DATABASE_URL: postgresql://dashtec:dashtec@${DB_HOST:-postgres-mainnet}:5432/dashtec
PONDER_SCHEMA: ponder_prod
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pgrep -x node || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
profiles:
- mainnet
# Testnet Web
web-testnet:
build:
context: .
dockerfile: apps/web/Dockerfile
args:
NETWORK: testnet
image: dashtec-web:testnet
container_name: dashtec-web-testnet
ports:
- "${WEB_TESTNET_PORT:-3001}:3000"
env_file:
- apps/web/.env.testnet
environment:
DATABASE_URL: postgresql://dashtec:dashtec@postgres-testnet:5432/dashtec
REDIS_URL: redis://:dashtec@redis-testnet:6379
DATABASE_URL_REPLICA: postgresql://dashtec:dashtec@postgres-testnet:5432/dashtec
NEXT_SENTINEL_URL: ${NEXT_SENTINEL_URL_TESTNET}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
profiles:
- testnet
# Testnet Indexer Ponder
indexer-ponder-testnet:
build:
context: .
dockerfile: packages/indexer-ponder/Dockerfile
image: dashtec-indexer-ponder:testnet
container_name: dashtec-indexer-ponder-testnet
ports:
- "${PONDER_TESTNET_PORT:-42070}:42069"
env_file:
- packages/indexer-ponder/.env.testnet
environment:
DATABASE_SCHEMA: ponder_prod
DATABASE_URL: postgresql://dashtec:dashtec@postgres-testnet:5432/dashtec
REDIS_URL: redis://:dashtec@redis-testnet:6379
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:42069/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
profiles:
- testnet
# Testnet Indexer Custom
indexer-custom-testnet:
build:
context: .
dockerfile: packages/indexer-custom/Dockerfile
image: dashtec-indexer-custom:testnet
container_name: dashtec-indexer-custom-testnet
ports:
- "${COLLECTOR_VALIDATOR_STATS_TESTNET_PORT:-4010}:4000"
- "${COLLECTOR_VALIDATOR_LIST_TESTNET_PORT:-4011}:4001"
- "${COLLECTOR_EPOCH_INTEGRITY_TESTNET_PORT:-4012}:4002"
- "${COLLECTOR_VALIDATOR_MIGRATION_TESTNET_PORT:-4013}:4003"
- "${COLLECTOR_PROVIDER_LIST_TESTNET_PORT:-4014}:4004"
env_file:
- packages/indexer-custom/.env.testnet
environment:
DATABASE_URL: postgresql://dashtec:dashtec@postgres-testnet:5432/dashtec
DATABASE_READ_REPLICA_URL: postgresql://dashtec:dashtec@postgres-testnet:5432/dashtec
REDIS_URL: redis://:dashtec@redis-testnet:6379
VALIDATOR_STATS_RPC_URL: ${VALIDATOR_STATS_RPC_URL_TESTNET}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
profiles:
- testnet
# Testnet Materializer
materializer-testnet:
build:
context: .
dockerfile: packages/materializer/Dockerfile
image: dashtec-materializer:testnet
container_name: dashtec-materializer-testnet
env_file:
- packages/materializer/.env.testnet
environment:
DATABASE_URL: postgresql://dashtec:dashtec@postgres-testnet:5432/dashtec
PONDER_SCHEMA: ponder_prod
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pgrep -x node || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
profiles:
- testnet
# Mainnet Database
postgres-mainnet:
image: postgres:16-alpine
container_name: dashtec-postgres-mainnet
ports:
- "${POSTGRES_MAINNET_PORT:-5432}:5432"
environment:
POSTGRES_USER: dashtec
POSTGRES_PASSWORD: dashtec
POSTGRES_DB: dashtec
volumes:
- postgres_data_mainnet:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dashtec"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- mainnet
# Testnet Database
postgres-testnet:
image: postgres:16-alpine
container_name: dashtec-postgres-testnet
ports:
- "${POSTGRES_TESTNET_PORT:-5433}:5432"
environment:
POSTGRES_USER: dashtec
POSTGRES_PASSWORD: dashtec
POSTGRES_DB: dashtec
volumes:
- postgres_data_testnet:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dashtec"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- testnet
# Mainnet Redis
redis-mainnet:
image: redis:7-alpine
container_name: dashtec-redis-mainnet
command: redis-server --requirepass ${REDIS_PASSWORD:-dashtec}
ports:
- "${REDIS_MAINNET_PORT:-6379}:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-dashtec}
volumes:
- redis_data_mainnet:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-dashtec}", "ping"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- mainnet
# Testnet Redis
redis-testnet:
image: redis:7-alpine
container_name: dashtec-redis-testnet
command: redis-server --requirepass ${REDIS_PASSWORD:-dashtec}
ports:
- "${REDIS_TESTNET_PORT:-6380}:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-dashtec}
volumes:
- redis_data_testnet:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-dashtec}", "ping"]
interval: 10s
timeout: 5s
retries: 5
profiles:
- testnet
volumes:
postgres_data_mainnet:
postgres_data_testnet:
redis_data_mainnet:
redis_data_testnet: