工作随笔——elasticsearch 6.6.1安装(docker-compose方式)

 

docker-compose.yml:

version: '2.2'
services:
  es1:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
    container_name: es1
    environment:
      - bootstrap.memory_lock=true    // 锁定内存
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    ports:
      - 9200:9200
      - 9300:9300
    networks:
      - esnet
      
  es2:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
    container_name: es2
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
      - "discovery.zen.ping.unicast.hosts=es1"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      - esnet

  es3:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
    container_name: es3
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
      - "discovery.zen.ping.unicast.hosts=es1"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      - esnet
      
  es4:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
    container_name: es4
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
      - "discovery.zen.ping.unicast.hosts=es1"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      - esnet      
      
  es5:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
    container_name: es5
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
      - "discovery.zen.ping.unicast.hosts=es1"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      - esnet
      
  es6:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1
    container_name: es6
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m"
      - "discovery.zen.ping.unicast.hosts=es1"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    networks:
      - esnet

  kibana:
    image: docker.elastic.co/kibana/kibana:6.6.1
    container_name: kibana
    ports:
      - 5601:5601
    environment:
      - ELASTICSEARCH_URL=http://es1:9200
    networks:
      - esnet

networks:
  esnet:

 

posted @ 2019-03-21 17:00  爱自己  阅读(1688)  评论(0编辑  收藏  举报