-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (96 loc) · 2.7 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (96 loc) · 2.7 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
90
91
92
93
94
95
96
97
98
99
100
# Docker Compose for Clad Studio 2-validator testnet
#
# Two modes of operation:
#
# 1. Use pre-built image (RECOMMENDED - fast):
# export CLAD_IMAGE=ghcr.io/clad-sovereign/clad-node:latest
# podman-compose up -d
#
# 2. Build from source (slow, ~30-60 min):
# podman-compose up -d --build
#
# Ports:
# Alice: ws://localhost:9944, http://localhost:9933, metrics http://localhost:9615
# Bob: ws://localhost:9945, http://localhost:9934, metrics http://localhost:9616
#
# Connect Polkadot.js Apps: https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944
services:
alice:
image: ${CLAD_IMAGE:-}
build:
context: .
dockerfile: ${CLAD_DOCKERFILE:-Dockerfile}
container_name: clad-alice
ports:
- "9944:9944" # WebSocket RPC
- "9933:9933" # HTTP RPC
- "30333:30333" # P2P
- "9615:9615" # Prometheus metrics
volumes:
- alice-data:/clad-node/.local/share
command: [
"--alice",
"--validator",
"--base-path", "/clad-node/.local/share/alice",
"--chain", "local",
"--node-key", "0000000000000000000000000000000000000000000000000000000000000001",
"--port", "30333",
"--rpc-port", "9933",
"--rpc-external",
"--rpc-cors", "all",
"--rpc-methods", "Safe",
"--prometheus-external",
"--prometheus-port", "9615"
]
networks:
- clad-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9933/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
bob:
image: ${CLAD_IMAGE:-}
build:
context: .
dockerfile: ${CLAD_DOCKERFILE:-Dockerfile}
container_name: clad-bob
ports:
- "9945:9944" # WebSocket RPC (different host port)
- "9934:9933" # HTTP RPC (different host port)
- "30334:30333" # P2P (different host port)
- "9616:9615" # Prometheus metrics (different host port)
volumes:
- bob-data:/clad-node/.local/share
command: [
"--bob",
"--validator",
"--base-path", "/clad-node/.local/share/bob",
"--chain", "local",
"--port", "30333",
"--rpc-port", "9933",
"--rpc-external",
"--rpc-cors", "all",
"--rpc-methods", "Safe",
"--prometheus-external",
"--prometheus-port", "9615",
"--bootnodes", "/dns/alice/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp"
]
depends_on:
alice:
condition: service_healthy
networks:
- clad-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9933/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
alice-data:
bob-data:
networks:
clad-network:
driver: bridge