Last active
September 4, 2019 07:57
-
-
Save monogot/5702542030ed05d77a706f054e2f3e5b to your computer and use it in GitHub Desktop.
Docker-compose file for ELK stack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
elasticsearch: | |
build: | |
context: elasticsearch/ | |
args: | |
ELK_VERSION: $ELK_VERSION | |
volumes: | |
#- ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro | |
- esdata01:/usr/share/elasticsearch/data | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
environment: | |
- node.name=es01 | |
- discovery.seed_hosts=es02 | |
- cluster.initial_master_nodes=es01 | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms2g -Xmx2g" | |
- "ELASTIC_PASSWORD=changeme" | |
ulimits: | |
memlock: | |
soft: -1 | |
hard: -1 | |
networks: | |
- elk | |
logstash: | |
build: | |
context: logstash/ | |
args: | |
ELK_VERSION: $ELK_VERSION | |
volumes: | |
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro | |
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro | |
ports: | |
- "5000:5000" | |
- "9600:9600" | |
environment: | |
LS_JAVA_OPTS: "-Xmx512m -Xms512m" | |
networks: | |
- elk | |
depends_on: | |
- elasticsearch | |
kibana: | |
build: | |
context: kibana/ | |
args: | |
ELK_VERSION: $ELK_VERSION | |
volumes: | |
- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro | |
ports: | |
- "5601:5601" | |
networks: | |
- elk | |
depends_on: | |
- elasticsearch | |
volumes: | |
esdata01: | |
driver: local | |
networks: | |
elk: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment