Skip to content

Commit

Permalink
GH-420: Elasticsearch for DDEV
Browse files Browse the repository at this point in the history
- Use default ES configuration by ddev-elasticsearch
- Use docker-compose.elasticsearch_extra.yaml to only override
  the image to use ES8 + install analysis-ukrainian and analysis-icu.
  • Loading branch information
sampoturve committed Aug 13, 2024
1 parent 431634f commit 29deea6
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .ddev/addon-metadata/elasticsearch/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: elasticsearch
repository: ddev/ddev-elasticsearch
version: v0.3.2
install_date: "2024-08-13T10:51:11+03:00"
project_files:
- elasticsearch/
- docker-compose.elasticsearch.yaml
global_files: []
removal_actions: []
28 changes: 28 additions & 0 deletions .ddev/docker-compose.elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ddev-generated
services:
elasticsearch:
container_name: ddev-${DDEV_SITENAME}-elasticsearch
hostname: ${DDEV_SITENAME}-elasticsearch
image: elasticsearch:7.17.14
expose:
- "9200"
- "9300"
environment:
- cluster.name=docker-cluster
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTP_EXPOSE=9200:9200
- HTTPS_EXPOSE=9201:9200
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
volumes:
- elasticsearch:/usr/share/elasticsearch/data
- ".:/mnt/ddev_config"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s elasticsearch:9200"]

volumes:
elasticsearch:
8 changes: 8 additions & 0 deletions .ddev/docker-compose.elasticsearch_extra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Overrides for default Elasticsearch configuration.
services:
elasticsearch:
image: elasticsearch:8.10.2
volumes:
- ./elasticsearch/config/elasticsearch8.yml:/usr/share/elasticsearch/config/elasticsearch.yml
command: >
/bin/sh -c "./bin/elasticsearch-plugin install analysis-ukrainian analysis-icu; /usr/local/bin/docker-entrypoint.sh"
15 changes: 15 additions & 0 deletions .ddev/elasticsearch/config/elasticsearch8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ddev-generated
# This file contains the configuration settings for Elasticsearch 8.
# For more information, see https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html

# https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#cluster-name
cluster.name: "docker-cluster"

# https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#network.host
network.host: 0.0.0.0

# Disable security features
# https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#general-security-settings
xpack.security.enabled: false
xpack.security.autoconfiguration.enabled: false
xpack.security.enrollment.enabled: false
6 changes: 6 additions & 0 deletions .ddev/elasticsearch/docker-compose.elasticsearch8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ddev-generated
services:
elasticsearch:
image: elasticsearch:8.10.2
volumes:
- ./elasticsearch/config/elasticsearch8.yml:/usr/share/elasticsearch/config/elasticsearch.yml

0 comments on commit 29deea6

Please sign in to comment.