Skip to content

Instantly share code, notes, and snippets.

@fakabbir
Created August 19, 2023 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fakabbir/888f09a6a9b2317a3959804e852ca656 to your computer and use it in GitHub Desktop.
Save fakabbir/888f09a6a9b2317a3959804e852ca656 to your computer and use it in GitHub Desktop.
Elastic Search Quick Docker Compose File
version: "3"
services:
elasticsearch: # Elasticsearch Instance
container_name: gs-search
image: elasticsearch:7.9.1
volumes: # Persist ES data in seperate "esdata" volume
- esdata:/usr/share/elasticsearch/data
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ports: # Expose Elasticsearch ports
- "9300:9300"
- "9200:9200"
volumes: # Define seperate volume for Elasticsearch data
esdata:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment