Skip to content

Commit bb07773

Browse files
committed
[Examples] Fix cluster name conflict between Elasticsearch and OpenSearch
1 parent da3c61a commit bb07773

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/compose.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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'
@@ -149,6 +150,7 @@ services:
149150
opensearch:
150151
image: opensearchproject/opensearch
151152
environment:
153+
cluster.name: 'opensearch-cluster'
152154
discovery.type: 'single-node'
153155
bootstrap.memory_lock: true
154156
indices.requests.cache.maximum_cacheable_size: 256
@@ -162,7 +164,7 @@ services:
162164
soft: 65536
163165
hard: 65536
164166
healthcheck:
165-
test: [ 'CMD', 'curl', "-f", "http://127.0.0.1:9200" ]
167+
test: [ 'CMD', 'curl', '-f', 'http://127.0.0.1:9200/_cluster/health' ]
166168
interval: 30s
167169
start_period: 120s
168170
timeout: 20s

0 commit comments

Comments
 (0)