-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.testnet.yml
More file actions
87 lines (84 loc) · 2.97 KB
/
docker-compose.testnet.yml
File metadata and controls
87 lines (84 loc) · 2.97 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
# Testnet indexer stack — runs alongside the mainnet stack on the same
# host. Separate Postgres DB + separate ports so
# `docker compose -f docker-compose.yml ...` (mainnet) and
# `docker compose -f docker-compose.testnet.yml ...` don't collide.
#
# Started 2026-05-05 to back the scan-testnet.sentrixchain.com host so
# /stats/daily, /accounts/active, /contracts/stats, /whale/tx work on
# testnet too instead of falling through to chain native (which has the
# genesis-walk hang).
services:
postgres:
image: postgres:16-alpine
container_name: sentrix-indexer-testnet-pg
restart: unless-stopped
environment:
POSTGRES_USER: indexer
POSTGRES_PASSWORD: indexer
POSTGRES_DB: sentrix_indexer_testnet
ports:
- "127.0.0.1:5433:5432"
volumes:
- ./.docker/postgres-testnet:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U indexer -d sentrix_indexer_testnet"]
interval: 10s
timeout: 5s
retries: 5
indexer:
build:
context: .
dockerfile: apps/indexer/Dockerfile
container_name: sentrix-indexer-testnet-worker
restart: unless-stopped
init: true
depends_on:
postgres:
condition: service_healthy
environment:
INDEXER_DATABASE_URL: postgres://indexer:indexer@postgres:5432/sentrix_indexer_testnet
INDEXER_NETWORK: testnet
INDEXER_HEALTH_PORT: 8084
LOG_LEVEL: info
# Bumped from default 50 — testnet currently 2.5M blocks ahead of the
# backfill cursor; at 50/batch the catch-up ETA is ~70h. 500/batch
# tightens that to ~7h with no observed RPC pressure increase
# (each block fetch is independent and our retry429 wrapper handles
# transient 429/502s anyway).
INDEXER_BATCH_SIZE: "500"
ports:
- "127.0.0.1:8084:8084"
# Override the Dockerfile's built-in healthcheck — the image bakes
# `wget http://127.0.0.1:8082/health` (mainnet default) but the
# testnet stack runs the worker on 8084 via INDEXER_HEALTH_PORT.
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://127.0.0.1:8084/health || exit 1"]
interval: 30s
timeout: 5s
start_period: 20s
retries: 3
api:
build:
context: .
dockerfile: apps/api/Dockerfile
container_name: sentrix-indexer-testnet-api
restart: unless-stopped
init: true
depends_on:
postgres:
condition: service_healthy
environment:
INDEXER_DATABASE_URL: postgres://indexer:indexer@postgres:5432/sentrix_indexer_testnet
INDEXER_NETWORK: testnet
API_PORT: 8083
LOG_LEVEL: info
ports:
- "127.0.0.1:8083:8083"
# Same Dockerfile-port-mismatch story as the worker — bake-time
# default is 8081, testnet runs on 8083 via API_PORT env.
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://127.0.0.1:8083/health || exit 1"]
interval: 30s
timeout: 5s
start_period: 15s
retries: 3