-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.simple.yml
More file actions
87 lines (82 loc) · 2.38 KB
/
docker-compose.simple.yml
File metadata and controls
87 lines (82 loc) · 2.38 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
version: '3.8'
services:
# Bootstrap node - the first node that others connect to
polytorus-bootstrap:
image: polytorus:simple
container_name: polytorus-bootstrap
hostname: polytorus-bootstrap
ports:
- "8080:8080"
environment:
- RUST_LOG=info
- NODE_ID=bootstrap-node
- LISTEN_PORT=8080
- DEBUG_MODE=true
- POLYTORUS_DATA_DIR=/app/data
command: ["start-p2p", "--node-id", "bootstrap-node", "--listen-port", "8080", "--adaptive"]
networks:
- polytorus-testnet
# Node 1 - connects to bootstrap
polytorus-node1:
image: polytorus:simple
container_name: polytorus-node1
hostname: polytorus-node1
ports:
- "8081:8081"
environment:
- RUST_LOG=info
- NODE_ID=node-1
- LISTEN_PORT=8081
- BOOTSTRAP_PEERS=polytorus-bootstrap:8080
- DEBUG_MODE=true
- POLYTORUS_DATA_DIR=/app/data
command: ["start-p2p", "--node-id", "node-1", "--listen-port", "8081", "--bootstrap-peers", "polytorus-bootstrap:8080", "--adaptive"]
networks:
- polytorus-testnet
depends_on:
- polytorus-bootstrap
# Node 2 - connects to bootstrap
polytorus-node2:
image: polytorus:simple
container_name: polytorus-node2
hostname: polytorus-node2
ports:
- "8082:8082"
environment:
- RUST_LOG=info
- NODE_ID=node-2
- LISTEN_PORT=8082
- BOOTSTRAP_PEERS=polytorus-bootstrap:8080
- DEBUG_MODE=true
- POLYTORUS_DATA_DIR=/app/data
command: ["start-p2p", "--node-id", "node-2", "--listen-port", "8082", "--bootstrap-peers", "polytorus-bootstrap:8080", "--adaptive"]
networks:
- polytorus-testnet
depends_on:
- polytorus-bootstrap
# Transaction test client
polytorus-client:
image: polytorus:simple
container_name: polytorus-client
hostname: polytorus-client
environment:
- RUST_LOG=info
- NODE_ID=client-node
- LISTEN_PORT=8084
- BOOTSTRAP_PEERS=polytorus-bootstrap:8080,polytorus-node1:8081
- DEBUG_MODE=true
- POLYTORUS_DATA_DIR=/app/data
networks:
- polytorus-testnet
depends_on:
- polytorus-bootstrap
- polytorus-node1
- polytorus-node2
# Client starts in sleep mode - we'll exec commands into it
entrypoint: ["sleep", "infinity"]
networks:
polytorus-testnet:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16