Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions recipes/db-optimization/docker-compose-elastic-search.yml
Original file line number Diff line number Diff line change
@@ -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