forked from dingodb/dingo-store
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
140 lines (131 loc) · 3.4 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
version: '2.4'
x-shared-environment: &shared-env
SERVER_HOST: ${DINGO_HOST_IP}
RAFT_HOST: ${DINGO_HOST_IP}
COOR_RAFT_PEERS: ${DINGO_HOST_IP}:22101,${DINGO_HOST_IP}:22102,${DINGO_HOST_IP}:22103
COOR_SRV_PEERS: ${DINGO_HOST_IP}:22001,${DINGO_HOST_IP}:22002,${DINGO_HOST_IP}:22003
services:
coordinator1:
image: dingodatabase/dingo-store:latest
hostname: coordinator1
container_name: coordinator1
network_mode: host
environment:
FLAGS_role: coordinator
COORDINATOR_SERVER_START_PORT: 22001
COORDINATOR_RAFT_START_PORT: 22101
INSTANCE_START_ID: 1001
<<: *shared-env
coordinator2:
image: dingodatabase/dingo-store:latest
hostname: coordinator2
container_name: coordinator2
network_mode: host
environment:
FLAGS_role: coordinator
COORDINATOR_SERVER_START_PORT: 22002
COORDINATOR_RAFT_START_PORT: 22102
INSTANCE_START_ID: 1002
<<: *shared-env
coordinator3:
image: dingodatabase/dingo-store:latest
hostname: coordinator3
container_name: coordinator3
network_mode: host
environment:
FLAGS_role: coordinator
COORDINATOR_SERVER_START_PORT: 22003
COORDINATOR_RAFT_START_PORT: 22103
INSTANCE_START_ID: 1003
<<: *shared-env
store1:
image: dingodatabase/dingo-store:latest
hostname: store1
container_name: store1
network_mode: host
depends_on:
- coordinator1
- coordinator2
- coordinator3
environment:
FLAGS_role: store
RAFT_START_PORT: 20101
SERVER_START_PORT: 20001
INSTANCE_START_ID: 1001
<<: *shared-env
store2:
image: dingodatabase/dingo-store:latest
hostname: store2
container_name: store2
network_mode: host
depends_on:
- coordinator1
- coordinator2
- coordinator3
environment:
FLAGS_role: store
RAFT_START_PORT: 20102
SERVER_START_PORT: 20002
INSTANCE_START_ID: 1002
<<: *shared-env
store3:
image: dingodatabase/dingo-store:latest
hostname: store3
container_name: store3
network_mode: host
depends_on:
- coordinator1
- coordinator2
- coordinator3
environment:
FLAGS_role: store
RAFT_START_PORT: 20103
SERVER_START_PORT: 20003
INSTANCE_START_ID: 1003
<<: *shared-env
index1:
image: dingodatabase/dingo-store:latest
hostname: index1
container_name: index1
network_mode: host
depends_on:
- coordinator1
- coordinator2
- coordinator3
environment:
FLAGS_role: index
INDEX_RAFT_START_PORT: 21101
INDEX_SERVER_START_PORT: 21001
INDEX_INSTANCE_START_ID: 1101
<<: *shared-env
index2:
image: dingodatabase/dingo-store:latest
hostname: index2
container_name: index2
network_mode: host
depends_on:
- coordinator1
- coordinator2
- coordinator3
environment:
FLAGS_role: index
INDEX_RAFT_START_PORT: 21102
INDEX_SERVER_START_PORT: 21002
INDEX_INSTANCE_START_ID: 1102
<<: *shared-env
index3:
image: dingodatabase/dingo-store:latest
hostname: index3
container_name: index3
network_mode: host
depends_on:
- coordinator1
- coordinator2
- coordinator3
environment:
FLAGS_role: index
INDEX_RAFT_START_PORT: 21103
INDEX_SERVER_START_PORT: 21003
INDEX_INSTANCE_START_ID: 1103
<<: *shared-env