Skip to content

Commit 0ad2e91

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

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

examples/compose.yaml

Lines changed: 6 additions & 4 deletions
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'
@@ -138,17 +139,18 @@ 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

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

0 commit comments

Comments
 (0)