Pārlūkot izejas kodu

Fix healthcheck for opensearch vs elasticsearch

Mark Shust 2 gadi atpakaļ
vecāks
revīzija
0d1c9213e0
2 mainītis faili ar 24 papildinājumiem un 2 dzēšanām
  1. 9 2
      compose/compose.healthcheck.yaml
  2. 15 0
      compose/compose.yaml

+ 9 - 2
compose/compose.healthcheck.yaml

@@ -33,13 +33,20 @@ services:
       timeout: 5s
       retries: 30
 
-  elasticsearch:
+  opensearch:
     healthcheck:
-      test: 'curl --fail elasticsearch:9200/_cat/health >/dev/null || exit 1'
+      test: 'curl --fail opensearch:9200/_cat/health >/dev/null || exit 1'
       interval: 5s
       timeout: 5s
       retries: 30
 
+  #elasticsearch:
+  #  healthcheck:
+  #    test: 'curl --fail elasticsearch:9200/_cat/health >/dev/null || exit 1'
+  #    interval: 5s
+  #    timeout: 5s
+  #    retries: 30
+
   rabbitmq:
     healthcheck:
       test: 'rabbitmq-diagnostics -q ping'

+ 15 - 0
compose/compose.yaml

@@ -65,6 +65,21 @@ services:
       - "cluster.routing.allocation.disk.threshold_enabled=false"
       - "index.blocks.read_only_allow_delete"
 
+  ## If you wish to use Elasticsearch, comment out opensearch image above and
+  ## uncomment this block. Do the same in the composer.healthcheck.yaml file.
+  #elasticsearch:
+  #  image: markoshust/magento-elasticsearch:7.17-0
+  #  ports:
+  #    - "9200:9200"
+  #    - "9300:9300"
+  #  env_file: env/elasticsearch.env
+  #  environment:
+  #    - "discovery.type=single-node"
+  #    ## Avoid test failures due to small disks
+  #    ## More info at https://github.com/markshust/docker-magento/issues/488
+  #    - "cluster.routing.allocation.disk.threshold_enabled=false"
+  #    - "index.blocks.read_only_allow_delete"
+
   rabbitmq:
     image: markoshust/magento-rabbitmq:3.9-0
     ports: