-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (57 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
62 lines (57 loc) · 1.08 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
version: '3.8'
services:
node0:
build: .
container_name: distributeddb_node0
command: >
./build/distributeddb_raft_server
0 8080 9000
1:node1:9001
2:node2:9002
ports:
- "8080:8080"
- "9000:9000"
volumes:
- node0_data:/app/data/node0
networks:
- raft_net
restart: on-failure
node1:
build: .
container_name: distributeddb_node1
command: >
./build/distributeddb_raft_server
1 8081 9001
0:node0:9000
2:node2:9002
ports:
- "8081:8081"
- "9001:9001"
volumes:
- node1_data:/app/data/node1
networks:
- raft_net
restart: on-failure
node2:
build: .
container_name: distributeddb_node2
command: >
./build/distributeddb_raft_server
2 8082 9002
0:node0:9000
1:node1:9001
ports:
- "8082:8082"
- "9002:9002"
volumes:
- node2_data:/app/data/node2
networks:
- raft_net
restart: on-failure
volumes:
node0_data:
node1_data:
node2_data:
networks:
raft_net:
driver: bridge