-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.49 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
services:
postgres:
image: postgres:16-alpine
container_name: lut-indexer-db
environment:
POSTGRES_USER: indexer
POSTGRES_PASSWORD: indexer
POSTGRES_DB: lut_indexer
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U indexer -d lut_indexer"]
interval: 5s
timeout: 5s
retries: 5
indexer:
build:
context: .
dockerfile: Dockerfile
container_name: lut-indexer
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgres://indexer:indexer@postgres:5432/lut_indexer
YELLOWSTONE_ENDPOINT: ${YELLOWSTONE_ENDPOINT}
YELLOWSTONE_TOKEN: ${YELLOWSTONE_TOKEN:-}
RPC_WS_URL: ${RPC_WS_URL:-wss://api.mainnet-beta.solana.com}
RUST_LOG: ${RUST_LOG:-info}
restart: unless-stopped
command: ["live"]
# Optional: Run backfill instead of live indexing
# Uncomment and configure as needed
# backfill:
# build:
# context: .
# dockerfile: Dockerfile
# container_name: lut-indexer-backfill
# depends_on:
# postgres:
# condition: service_healthy
# environment:
# DATABASE_URL: postgres://indexer:indexer@postgres:5432/lut_indexer
# RPC_WS_URL: ${RPC_WS_URL:-wss://api.mainnet-beta.solana.com}
# RUST_LOG: ${RUST_LOG:-info}
# command: ["backfill", "--start-slot", "200000000", "--end-slot", "200100000"]
volumes:
postgres_data: