Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pseudo-usama/6eddabb297878504c204636824d45813 to your computer and use it in GitHub Desktop.
Save pseudo-usama/6eddabb297878504c204636824d45813 to your computer and use it in GitHub Desktop.
version: '3.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
container_name: elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=true
- ELASTIC_PASSWORD=YourElasticPassword
- "ES_JAVA_OPTS=-Xms2g -Xmx2g" # Adjust heap size to 2GB
- bootstrap.memory_lock=true # Disable swapping
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
volumes:
- /home/user/Documents/senarios/elasticsearch/:/usr/share/elasticsearch/data # Adjust for production
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment