(Docker) Elastic, logstash, kibana(Docker-compose)

version: '2.2'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.2.1
    container_name: elasticsearch
    hostname: elasticsearch
    environment:
      - cluster.name=docker-cluster
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - esdata1:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
 
  logstash:
    image: docker.elastic.co/logstash/logstash:6.2.1
    container_name: logstash
    hostname: logstash
    environment:
      - "LS_JAVA_OPTS=-Xms512m -Xmx512m"
    ports:
      - 9600:9600
    volumes:
      - ~/Docker/elasticsearch/logstashconf:/etc/logstash/conf.d
    command: sh -c "bin/logstash-plugin install logstash-output-mongodb && logstash -f /etc/logstash/conf.d/logstash.conf"
    links:
      - elasticsearch

  kibana:
    image: docker.elastic.co/kibana/kibana:6.2.1
    container_name: kibana
    hostname: kibana
    ports:
      - 5601:5601
    volumes:
      - ~/Docker/elasticsearch/kibanaconfig:/usr/share/kibana/config
    links:
      - elasticsearch

volumes:
  esdata1:
    driver: local
  logstashconfig:
    driver: local
  kibanaconfig:
    driver: local

networks:
  default:
    external:
      name: kafka-single-node_default

댓글

이 블로그의 인기 게시물

(18장) WebSocekt과 STOMP를 사용하여 메시징하기

(네트워크)폴링방식 vs 롱 폴링방식

(ElasticSearch) 결과에서 순서 정렬