JeroenBoersma / docker-compose-development

Clone and `bin/dev up`. Quickly start of developing locally with Nginx, PHP, Blackfire, Percona, Mailhog and Redis. Out of the box support for Magento2 Developer Box
MIT License
208 stars 63 forks source link

Add Elasticsearch 8.10 or higher #183

Open peterjaap opened 2 months ago

peterjaap commented 2 months ago

So we can make use of https://www.elastic.co/blog/introducing-query-rules-elasticsearch-8-10

peterjaap commented 2 months ago

build/dist/docker-compose-elasticsearch8.yml

services:
  elasticsearch8:
    build:
      context: build/dist/elasticsearch
      args:
        - FROM_TAG=8.14.2
    environment:
        - "discovery.type=single-node"
touch conf/elasticsearch8
dev rebuild
docker ps | grep elasticsearch8
docker inspect <container-id> | grep IPAddress
docker exec -it <container-id> /bin/bash

sed -i '/^xpack.security.enabled:/d' /usr/share/elasticsearch/config/elasticsearch.yml
echo 'xpack.security.enabled: false' >> /usr/share/elasticsearch/config/elasticsearch.yml
sed -i 's/^xpack.security.http.ssl.enabled: true/#xpack.security.http.ssl.enabled: false/' /usr/share/elasticsearch/config/elasticsearch.yml
sed -i 's/^xpack.security.http.ssl.keystore.path: .*/#&/' /usr/share/elasticsearch/config/elasticsearch.yml
sed -i 's/^xpack.security.http.ssl.truststore.path: .*/#&/' /usr/share/elasticsearch/config/elasticsearch.yml
docker restart <container-id>
$ curl -X GET http://172.19.0.6:9200
{
  "name" : "79ee9caeaac5",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "SVfA0xwNT_mfUlylRGGCDQ",
  "version" : {
    "number" : "8.14.2",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "2afe7caceec8a26ff53817e5ed88235e90592a1b",
    "build_date" : "2024-07-01T22:06:58.515911606Z",
    "build_snapshot" : false,
    "lucene_version" : "9.10.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}`
peterjaap commented 2 months ago

Info on how to use ES8 with Elasticsuite; https://github.com/Smile-SA/elasticsuite/issues/3273