-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yml
83 lines (81 loc) · 2.11 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
72
73
74
75
76
77
78
79
80
81
82
83
version: '3'
services:
node1:
build:
context: .
dockerfile: Dockerfile.node1
networks:
static-network:
ipv4_address: 172.20.128.1
node2:
build:
context: .
dockerfile: Dockerfile.node2
restart: on-failure
depends_on:
- "node1"
networks:
static-network:
ipv4_address: 172.20.128.2
node3:
build:
context: .
dockerfile: Dockerfile.node3
restart: on-failure
depends_on:
- "node1"
networks:
static-network:
ipv4_address: 172.20.128.3
node4:
build:
context: .
dockerfile: Dockerfile.node4
restart: on-failure
depends_on:
- "node1"
networks:
static-network:
ipv4_address: 172.20.128.4
node5:
build:
context: .
dockerfile: Dockerfile.node5
restart: on-failure
depends_on:
- "node1"
networks:
static-network:
ipv4_address: 172.20.128.5
##################################################################
# Client docker containers: uncomment to build with server nodes #
##################################################################
# client1:
# build:
# context: .
# dockerfile: Dockerfile.leader_client
# restart: on-failure
# depends_on:
# - "node1"
# - "node2"
# - "node3"
# - "node4"
# - "node5"
# networks:
# static-network:
# ipv4_address: 172.20.192.1
# client2:
# build:
# context: .
# dockerfile: Dockerfile.acquire_leader
# restart: on-failure
# depends_on:
# - "client1"
# networks:
# static-network:
# ipv4_address: 172.20.193.1
networks:
static-network:
ipam:
config:
- subnet: 172.20.0.0/16