@@ -127,6 +127,7 @@ services:
127127 elasticsearch :
128128 image : docker.elastic.co/elasticsearch/elasticsearch:9.2.2
129129 environment :
130+ cluster.name : ' elasticsearch-cluster'
130131 discovery.type : ' single-node'
131132 xpack.security.enabled : false
132133 ES_JAVA_OPTS : ' -Xms512m -Xmx512m'
@@ -138,11 +139,11 @@ services:
138139 soft : 65536
139140 hard : 65536
140141 healthcheck :
141- test : [ 'CMD', 'curl', '-f', 'http://127.0.0.1:9200/_cluster/health' ]
142- interval : 30s
142+ test : [ 'CMD', 'curl', '-f', 'http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow&timeout=1s ' ]
143+ interval : 10s
143144 start_period : 120s
144- timeout : 20s
145- retries : 3
145+ timeout : 5s
146+ retries : 5
146147 ports :
147148 - ' 9201:9200'
148149
@@ -151,9 +152,9 @@ services:
151152 environment :
152153 discovery.type : ' single-node'
153154 bootstrap.memory_lock : true
154- indices.requests.cache.maximum_cacheable_size : 256
155- DISABLE_SECURITY_PLUGIN : true
156155 OPENSEARCH_JAVA_OPTS : ' -Xms512m -Xmx512m'
156+ volumes :
157+ - ./opensearch.yml:/usr/share/opensearch/config/opensearch.yml:ro
157158 ulimits :
158159 memlock :
159160 soft : -1
@@ -162,11 +163,11 @@ services:
162163 soft : 65536
163164 hard : 65536
164165 healthcheck :
165- test : [ 'CMD', 'curl', "-f", " http://127.0.0.1:9200" ]
166- interval : 30s
166+ test : [ 'CMD', 'curl', '-f', ' http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow&timeout=1s' ]
167+ interval : 10s
167168 start_period : 120s
168- timeout : 20s
169- retries : 3
169+ timeout : 5s
170+ retries : 5
170171 ports :
171172 - ' 9200:9200'
172173 - ' 9600:9600'
0 commit comments