Skip to content

Instantly share code, notes, and snippets.

@ajeetraina
Created October 4, 2018 11:53
Show Gist options
  • Save ajeetraina/24900c12def00c414a1d1e1ac0473d2c to your computer and use it in GitHub Desktop.
Save ajeetraina/24900c12def00c414a1d1e1ac0473d2c to your computer and use it in GitHub Desktop.
Docker Compose for ELK Stack
version: '2'
services:
elasticsearch:
build:
context: elasticsearch/
volumes:
- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- elk
logstash:
build:
context: logstash/
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
ports:
- "5000:5000"
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- elk
depends_on:
- elasticsearch
kibana:
build:
context: kibana/
volumes:
- ./kibana/config/:/usr/share/kibana/config:ro
ports:
- "5601:5601"
networks:
- elk
depends_on:
- elasticsearch
networks:
elk:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment