1- #
1+ #
22# Licensed to the Apache Software Foundation (ASF) under one or more
33# contributor license agreements. See the NOTICE file distributed with
44# this work for additional information regarding copyright ownership.
@@ -20,9 +20,6 @@ name: hugegraph-3x3
2020networks :
2121 hg-net :
2222 driver : bridge
23- ipam :
24- config :
25- - subnet : 172.20.0.0/24
2623
2724volumes :
2825 hg-pd0-data :
@@ -36,8 +33,9 @@ volumes:
3633
3734x-pd-common : &pd-common
3835 image : hugegraph/pd:${HUGEGRAPH_VERSION:-latest}
39- pull_policy : always
36+ pull_policy : missing
4037 restart : unless-stopped
38+ networks : [hg-net]
4139 entrypoint : ["/hugegraph-pd/docker-entrypoint.sh"]
4240 healthcheck :
4341 test : ["CMD-SHELL", "curl -fsS http://localhost:8620/v1/health >/dev/null || exit 1"]
@@ -48,7 +46,7 @@ x-pd-common: &pd-common
4846
4947x-store-common : &store-common
5048 image : hugegraph/store:${HUGEGRAPH_VERSION:-latest}
51- pull_policy : always
49+ pull_policy : missing
5250 restart : unless-stopped
5351 networks : [hg-net]
5452 depends_on :
@@ -65,7 +63,7 @@ x-store-common: &store-common
6563
6664x-server-common : &server-common
6765 image : hugegraph/server:${HUGEGRAPH_VERSION:-latest}
68- pull_policy : always
66+ pull_policy : missing
6967 restart : unless-stopped
7068 networks : [hg-net]
7169 depends_on :
@@ -76,7 +74,7 @@ x-server-common: &server-common
7674 environment :
7775 STORE_REST : store0:8520
7876 HG_SERVER_BACKEND : hstore
79- HG_SERVER_PD_PEERS : 172.20.0.10 :8686,172.20.0.11 :8686,172.20.0.12 :8686
77+ HG_SERVER_PD_PEERS : pd0 :8686,pd1 :8686,pd2 :8686
8078 healthcheck :
8179 test : ["CMD-SHELL", "curl -fsS http://localhost:8080/versions >/dev/null || exit 1"]
8280 interval : 10s
@@ -92,15 +90,13 @@ services:
9290 << : *pd-common
9391 container_name : hg-pd0
9492 hostname : pd0
95- networks :
96- hg-net :
97- ipv4_address : 172.20.0.10
93+ networks : [ hg-net ]
9894 environment :
99- HG_PD_GRPC_HOST : 172.20.0.10
95+ HG_PD_GRPC_HOST : pd0
10096 HG_PD_GRPC_PORT : " 8686"
10197 HG_PD_REST_PORT : " 8620"
102- HG_PD_RAFT_ADDRESS : 172.20.0.10 :8610
103- HG_PD_RAFT_PEERS_LIST : 172.20.0.10 :8610,172.20.0.11 :8610,172.20.0.12 :8610
98+ HG_PD_RAFT_ADDRESS : pd0 :8610
99+ HG_PD_RAFT_PEERS_LIST : pd0 :8610,pd1 :8610,pd2 :8610
104100 HG_PD_INITIAL_STORE_LIST : store0:8500,store1:8500,store2:8500
105101 HG_PD_DATA_PATH : /hugegraph-pd/pd_data
106102 HG_PD_INITIAL_STORE_COUNT : 3
@@ -113,15 +109,13 @@ services:
113109 << : *pd-common
114110 container_name : hg-pd1
115111 hostname : pd1
116- networks :
117- hg-net :
118- ipv4_address : 172.20.0.11
112+ networks : [ hg-net ]
119113 environment :
120- HG_PD_GRPC_HOST : 172.20.0.11
114+ HG_PD_GRPC_HOST : pd1
121115 HG_PD_GRPC_PORT : " 8686"
122116 HG_PD_REST_PORT : " 8620"
123- HG_PD_RAFT_ADDRESS : 172.20.0.11 :8610
124- HG_PD_RAFT_PEERS_LIST : 172.20.0.10 :8610,172.20.0.11 :8610,172.20.0.12 :8610
117+ HG_PD_RAFT_ADDRESS : pd1 :8610
118+ HG_PD_RAFT_PEERS_LIST : pd0 :8610,pd1 :8610,pd2 :8610
125119 HG_PD_INITIAL_STORE_LIST : store0:8500,store1:8500,store2:8500
126120 HG_PD_DATA_PATH : /hugegraph-pd/pd_data
127121 HG_PD_INITIAL_STORE_COUNT : 3
@@ -134,15 +128,13 @@ services:
134128 << : *pd-common
135129 container_name : hg-pd2
136130 hostname : pd2
137- networks :
138- hg-net :
139- ipv4_address : 172.20.0.12
131+ networks : [ hg-net ]
140132 environment :
141- HG_PD_GRPC_HOST : 172.20.0.12
133+ HG_PD_GRPC_HOST : pd2
142134 HG_PD_GRPC_PORT : " 8686"
143135 HG_PD_REST_PORT : " 8620"
144- HG_PD_RAFT_ADDRESS : 172.20.0.12 :8610
145- HG_PD_RAFT_PEERS_LIST : 172.20.0.10 :8610,172.20.0.11 :8610,172.20.0.12 :8610
136+ HG_PD_RAFT_ADDRESS : pd2 :8610
137+ HG_PD_RAFT_PEERS_LIST : pd0 :8610,pd1 :8610,pd2 :8610
146138 HG_PD_INITIAL_STORE_LIST : store0:8500,store1:8500,store2:8500
147139 HG_PD_DATA_PATH : /hugegraph-pd/pd_data
148140 HG_PD_INITIAL_STORE_COUNT : 3
@@ -157,7 +149,7 @@ services:
157149 container_name : hg-store0
158150 hostname : store0
159151 environment :
160- HG_STORE_PD_ADDRESS : 172.20.0.10 :8686,172.20.0.11 :8686,172.20.0.12 :8686
152+ HG_STORE_PD_ADDRESS : pd0 :8686,pd1 :8686,pd2 :8686
161153 HG_STORE_GRPC_HOST : store0
162154 HG_STORE_GRPC_PORT : " 8500"
163155 HG_STORE_REST_PORT : " 8520"
@@ -173,7 +165,7 @@ services:
173165 container_name : hg-store1
174166 hostname : store1
175167 environment :
176- HG_STORE_PD_ADDRESS : 172.20.0.10 :8686,172.20.0.11 :8686,172.20.0.12 :8686
168+ HG_STORE_PD_ADDRESS : pd0 :8686,pd1 :8686,pd2 :8686
177169 HG_STORE_GRPC_HOST : store1
178170 HG_STORE_GRPC_PORT : " 8500"
179171 HG_STORE_REST_PORT : " 8520"
@@ -189,7 +181,7 @@ services:
189181 container_name : hg-store2
190182 hostname : store2
191183 environment :
192- HG_STORE_PD_ADDRESS : 172.20.0.10 :8686,172.20.0.11 :8686,172.20.0.12 :8686
184+ HG_STORE_PD_ADDRESS : pd0 :8686,pd1 :8686,pd2 :8686
193185 HG_STORE_GRPC_HOST : store2
194186 HG_STORE_GRPC_PORT : " 8500"
195187 HG_STORE_REST_PORT : " 8520"
0 commit comments