1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/elk/docker-compose.yml
2019-11-05 02:09:26 +08:00

61 lines
1.5 KiB
YAML

version: '3.7'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.2
ports:
- "9200:9200"
volumes:
- ./data:/usr/share/elasticsearch/data
environment:
- node.name=es1
- cluster.name=docker-cluster
- cluster.initial_master_nodes=es1
- bootstrap.memory_lock=true
- ES_JAVA_OPTS=-Xms8g -Xmx8g
ulimits:
memlock:
soft: -1
hard: -1
restart: unless-stopped
logstash:
image: docker.elastic.co/logstash/logstash:7.4.2
ports:
- "5044:5044"
- "9600:9600"
- "12201:12201/udp"
volumes:
- ./data/pipelines.yml:/usr/share/logstash/config/pipelines.yml
- ./data/pipelines:/usr/share/logstash/pipelines
environment:
- node.name=ls1
- xpack.monitoring.enabled=true
- xpack.monitoring.elasticsearch_hosts=[http://elasticsearch:9200]
- LS_JAVA_OPTS=-Xms4g -Xmx4g
depends_on:
- elasticsearch
restart: unless-stopped
kibana:
image: docker.elastic.co/kibana/kibana:7.4.2
ports:
- "5601:5601"
environment:
- SERVER_NAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
restart: unless-stopped
apm-server:
image: docker.elastic.co/apm/apm-server:7.4.2
ports:
- "8200:8200"
volumes:
- ./data/apm-server.yml:/usr/share/apm-server/apm-server.yml
depends_on:
- elasticsearch
restart: unless-stopped