forked from alexander-akhmetov/raft-kv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (61 loc) · 1.26 KB
/
docker-compose.yml
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
version: '3.6'
networks:
raft_example_net:
ipam:
driver: default
config:
- subnet: 10.1.0.0/24
services:
node_1:
build:
context: .
dockerfile: Dockerfile
volumes:
- type: tmpfs
target: /data/
environment:
BIND: "10.1.0.101:4001"
IDENTIFIER: "node_1"
HTTP: "True"
BOOTSTRAP: "True"
ports:
- "127.0.0.1:4001:8080"
networks:
raft_example_net:
ipv4_address: '10.1.0.101'
node_2:
build:
context: .
dockerfile: Dockerfile
environment:
BIND: "10.1.0.102:4002"
JOIN: "10.1.0.101:8080"
IDENTIFIER: "node_2"
volumes:
- type: tmpfs
target: /data/
depends_on:
- node_1
ports:
- "127.0.0.1:4002:8080"
networks:
raft_example_net:
ipv4_address: '10.1.0.102'
node_3:
build:
context: .
dockerfile: Dockerfile
environment:
BIND: "10.1.0.103:4003"
JOIN: "10.1.0.101:8080"
IDENTIFIER: "node_3"
volumes:
- type: tmpfs
target: /data/
depends_on:
- node_1
ports:
- "127.0.0.1:4003:8080"
networks:
raft_example_net:
ipv4_address: '10.1.0.103'