Skip to content

Instantly share code, notes, and snippets.

@winggundamth
Created April 28, 2018 09:01
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save winggundamth/6b3b12572ec32ce3a46d4d03c65570b8 to your computer and use it in GitHub Desktop.
Save winggundamth/6b3b12572ec32ce3a46d4d03c65570b8 to your computer and use it in GitHub Desktop.
Elasticsearch Cluster + Grafana Docker Compose File
version: '3'
services:
es1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: es1
environment:
cluster.name: "docker-cluster"
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
TAKE_FILE_OWNERSHIP: "true"
discovery.zen.ping.unicast.hosts: "es2,es3"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./data/esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
es2:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: es2
environment:
cluster.name: "docker-cluster"
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
TAKE_FILE_OWNERSHIP: "true"
discovery.zen.ping.unicast.hosts: "es1,es3"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./data/esdata2:/usr/share/elasticsearch/data
es3:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: es3
environment:
cluster.name: "docker-cluster"
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
TAKE_FILE_OWNERSHIP: "true"
discovery.zen.ping.unicast.hosts: "es1,es2"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./data/esdata3:/usr/share/elasticsearch/data
grafana:
image: grafana/grafana:5.1.0
container_name: grafana
volumes:
- ./data/grafana:/var/lib/grafana
ports:
- 3000:3000
user: "0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment