docker-compose.yml(3)



ELK:
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

docker-compose执行方式: docker-compose up -d
Dockerfile执行方式: docker build -t myname .

volumes:
- /etc/localtime:/etc/localtime:ro


version: '3'
services:
filebeat:
build:
context: .
privileged: true
volumes:
- ./log/:/usr/share/filebeat/logs
- ./filebeat.yml:/usr/share/filebeat/filebeat.yml
# nginx意外退出时自动重启
restart: always
network_mode: "host"
container_name: filebeat.6.2.4


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM