From e7d86a0bfdb690a813b19e7115d20ec5640b8dc9 Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Sat, 14 Jan 2023 23:04:28 +0200 Subject: [PATCH] add elastic search docker compose file --- .../docker-compose-elastic-search.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes/db-optimization/docker-compose-elastic-search.yml diff --git a/recipes/db-optimization/docker-compose-elastic-search.yml b/recipes/db-optimization/docker-compose-elastic-search.yml new file mode 100644 index 00000000..daf14c7d --- /dev/null +++ b/recipes/db-optimization/docker-compose-elastic-search.yml @@ -0,0 +1,26 @@ +version: '3.8' +services: + database: + image: docker.elastic.co/elasticsearch/elasticsearch:8.6.0 + environment: + - xpack.security.enabled=false + - discovery.type=single-node + + # Disable tracking actions taken as part of Snapshot Lifecycle Management (SLM) policies + # https://www.elastic.co/guide/en/elasticsearch/reference/8.6/snapshot-settings.html#_slm_settings + - slm.history_index_enabled=false + + # Disable memory swap, this may not be supported in all OSs + # https://www.elastic.co/guide/en/elasticsearch/reference/8.6/setup-configuration-memory.html#setup-configuration-memory + mem_swappiness: 1 + + # Uncomment if you want to limit the memory to 512 MB +# deploy: +# resources: +# limits: +# memory: 512M + + container_name: 'elastic-search-for-testing' + ports: + - '9200:9200' + tmpfs: /usr/share/elasticsearch/data