forked from propeller-heads/tycho-indexer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
88 lines (84 loc) · 2.52 KB
/
docker-compose.yaml
File metadata and controls
88 lines (84 loc) · 2.52 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
version: '3.1'
services:
db:
build:
context: .
dockerfile: postgres.Dockerfile
restart: "always"
environment:
POSTGRESQL_PASSWORD: mypassword
POSTGRESQL_DATABASE: tycho_indexer_0
POSTGRESQL_USERNAME: postgres
POSTGRESQL_SHARED_PRELOAD_LIBRARIES: pg_cron
ports:
- "5431:5432"
volumes:
- postgres_data:/bitnami/postgresql
shm_size: '2gb'
# Grafana LGTM stack for observability (Loki, Grafana, Tempo, Mimir)
lgtm:
image: grafana/otel-lgtm:latest
restart: "always"
ports:
- "3000:3000" # Grafana UI
- "4317:4317" # OpenTelemetry gRPC
- "4318:4318" # OpenTelemetry HTTP
- "3100:3100" # Loki API
volumes:
- lgtm_data:/data
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
# Promtail for log collection
promtail:
image: grafana/promtail:2.9.0
restart: "always"
depends_on:
- lgtm
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./promtail-config.yml:/etc/promtail/config.yml
command: -config.file=/etc/promtail/config.yml
tycho-indexer:
image: ${TYCHO_IMAGE}
restart: "no"
depends_on:
- db
- lgtm
- promtail
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
env_file:
- .env
environment:
SUBSTREAMS_API_TOKEN: ${SUBSTREAMS_API_TOKEN:-readme}
RPC_URL: ${RPC_URL:-readme}
TRACE_RPC_URL: ${TRACE_RPC_URL:-readme}
DATABASE_URL: ${DATABASE_URL:-postgres://postgres:mypassword@db:5432/tycho_indexer_0}
RUST_LOG: ${RUST_LOG:-info}
# Configure OTLP endpoint for tracing
OTLP_EXPORTER_ENDPOINT: ${OTLP_EXPORTER_ENDPOINT:-http://lgtm:4317}
ports:
- "4242:4242"
volumes:
- ./wait-for-postgres.sh:/usr/wait-for-postgres.sh
- ./extractors.yaml:/opt/tycho-indexer/extractors.yaml
- ./substreams/:/opt/tycho-indexer/substreams/
# Configure logging driver for better log collection
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels: "service,version"
labels:
- "service=tycho-indexer"
- "version=0.76.0"
entrypoint: [ "/usr/wait-for-postgres.sh", "db" ]
command: [ "/opt/tycho-indexer/tycho-indexer", "--endpoint", "https://mainnet.eth.streamingfast.io:443", "index", "--retention-horizon", "2025-07-23T00:00:00"]
volumes:
postgres_data:
lgtm_data: