Running Elasticsearch and Kibana on Docker

Running Elasticsearch and Kibana on Docker

  •  9个月前
  •  546
  •  Docker Elasticsearch Kibana 

使用docker-compose组织Elasticsearch、Kibana、Cerebro

Elasticsearch

  • 9200:HTTP协议,主要用于外部通讯
  • 9300:TCP协议,ES集群、ES与Java之间用该端口进行通信

Kibana

  • 搜索、查看存放在Elasticsearch中的数据

docker-compose文件

version: '2.2'
services:
    es:
        image: docker.elastic.co/elasticsearch/elasticsearch:6.7.2
        container_name: es
        environment:
            - cluster.name=docker-cluster
            - bootstrap.memory_lock=true
            - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
            memlock:
                soft: -1
                hard: -1
        volumes:
            - $PWD/es/data:/usr/share/elasticsearch/data
            - $PWD/es/config:/usr/share/elasticsearch/config
        ports:
            - 9200:9200
            - 9300:9300

    kibana:
        image: docker.elastic.co/kibana/kibana:6.7.2
        container_name: kibana
        environment:
            TZ: Asia/Shanghai
            SERVER_NAME: kibana
            ELASTICSEARCH_HOSTS: http://es:9200
        ports:
            - 5601:5601
        links:
          - es

    cerebro:
        image: lmenezes/cerebro:0.8.4
        container_name: cerebro
        ports:
            - 9000:9000
        command:
            - -Dhosts.0.host=http://es:9200
        links:
          - es


扫一扫分享到微信

已有 条评论
写评论