-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (51 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
52 lines (51 loc) · 1.22 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
# Docker Compose to run multiple nodes of the FastAPI blockchain tutorial
version: "3.9"
services:
node1:
build: .
container_name: blockchain-node1
environment:
- NODE_ID=node1
- PEERS=blockchain-node2:8000,blockchain-node3:8000
ports:
- "5000:8000"
networks:
- blockchain-net
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/api/status"]
interval: 10s
timeout: 2s
retries: 5
node2:
build: .
container_name: blockchain-node2
environment:
- NODE_ID=node2
- PEERS=blockchain-node1:8000,blockchain-node3:8000
ports:
- "5001:8000"
networks:
- blockchain-net
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/api/status"]
interval: 10s
timeout: 2s
retries: 5
node3:
build: .
container_name: blockchain-node3
environment:
- NODE_ID=node3
- PEERS=blockchain-node1:8000,blockchain-node2:8000
ports:
- "5002:8000"
networks:
- blockchain-net
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/api/status"]
interval: 10s
timeout: 2s
retries: 5
networks:
blockchain-net:
driver: bridge