-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (84 loc) · 3.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (84 loc) · 3.37 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
# =============================================================================
# Midnight Local Development Stack
# =============================================================================
# This runs 4 services you need for local development:
#
# 1. midnight-node — the local blockchain node (produces blocks)
# 2. pg — PostgreSQL (indexer database)
# 3. midnight-indexer — watches the node, indexes contract events
# 4. proof-server — generates ZK proofs locally (the privacy engine)
#
# Run with: docker compose up -d
# Stop with: docker compose down
# Logs: docker compose logs -f proof-server
#
# NOTE: For Preprod (remote testnet), you only need the proof-server service.
# Set MIDNIGHT_NETWORK=TestNet in your .env to use Preprod endpoints.
# =============================================================================
services:
# ─── Local Blockchain Node ──────────────────────────────────────────────────
midnight-node:
image: ghcr.io/midnight-ntwrk/midnight-node:latest
pull_policy: always
ports:
- "9944:9944" # WebSocket RPC
- "9933:9933" # HTTP RPC
environment:
- RUST_LOG=info
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:9933/health || exit 1"]
interval: 10s
timeout: 5s
retries: 10
volumes:
- node-data:/data
# ─── PostgreSQL for Indexer ──────────────────────────────────────────────────
pg:
image: postgres:15-alpine
environment:
POSTGRES_DB: midnight_indexer
POSTGRES_USER: indexer
POSTGRES_PASSWORD: indexer_password
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U indexer -d midnight_indexer"]
interval: 5s
timeout: 5s
retries: 10
volumes:
- pg-data:/var/lib/postgresql/data
# ─── Midnight Indexer ───────────────────────────────────────────────────────
midnight-indexer:
image: ghcr.io/midnight-ntwrk/midnight-indexer:latest
pull_policy: always
depends_on:
midnight-node:
condition: service_healthy
pg:
condition: service_healthy
ports:
- "8088:8088" # GraphQL API (queried by the Midnight SDK)
environment:
- INDEXER_DB_URL=postgresql://indexer:indexer_password@pg:5432/midnight_indexer
- INDEXER_NODE_WS=ws://midnight-node:9944
- RUST_LOG=info
# ─── Proof Server (The Privacy Engine) ──────────────────────────────────────
# This is the most important service. It runs on YOUR machine and generates
# zero-knowledge proofs. Sensitive private data (reserve price, bid amounts)
# are processed here and NEVER sent to the blockchain.
proof-server:
image: ghcr.io/midnight-ntwrk/proof-server:latest
pull_policy: always
ports:
- "6300:6300"
environment:
- RUST_LOG=info
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:6300/health || exit 1"]
interval: 10s
timeout: 10s
retries: 20
volumes:
node-data:
pg-data: