-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
56 lines (53 loc) · 1.59 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
# Docker Compose for ergo-index
# This is the DEFAULT configuration that connects to an EXTERNAL node
#
# Usage:
# 1. External node mode (default):
# docker-compose up -d
#
# 2. With embedded node:
# docker-compose -f docker-compose.yml -f docker-compose.embedded.yml up -d
#
# Configuration via environment variables or .env file
version: "3.8"
services:
ergo-index:
build:
context: .
dockerfile: Dockerfile
container_name: ergo-index
restart: unless-stopped
ports:
- "${INDEX_PORT:-8080}:8080"
volumes:
- ergo-index-data:/app/data
environment:
# Node connection - configure for your setup
- ERGO_NODES=${ERGO_NODES:-http://host.docker.internal:9053}
- NODE_API_KEY=${NODE_API_KEY:-}
# Database
- DATABASE_PATH=/app/data/ergo-index.duckdb
- DUCKDB_MEMORY_LIMIT=${DUCKDB_MEMORY_LIMIT:-4GB}
- DUCKDB_THREADS=${DUCKDB_THREADS:-4}
# Server
- PORT=8080
- HOST=0.0.0.0
# Sync settings
- SYNC_BATCH_SIZE=${SYNC_BATCH_SIZE:-50}
- SYNC_INTERVAL=${SYNC_INTERVAL:-10}
- SYNC_CONCURRENT_FETCHES=${SYNC_CONCURRENT_FETCHES:-20}
- SYNC_CHECKPOINT_INTERVAL=${SYNC_CHECKPOINT_INTERVAL:-10}
# Network
- NETWORK=${NETWORK:-mainnet}
extra_hosts:
# Allows connecting to host machine (for external node on localhost)
- "host.docker.internal:host-gateway"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
ergo-index-data:
driver: local