Skip to content

Instantly share code, notes, and snippets.

@johnnybui
Created October 30, 2018 02:57
Show Gist options
  • Save johnnybui/890c503c5132ec53db2fd8b49bbd98da to your computer and use it in GitHub Desktop.
Save johnnybui/890c503c5132ec53db2fd8b49bbd98da to your computer and use it in GitHub Desktop.

Revisions

  1. johnnybui created this gist Oct 30, 2018.
    62 changes: 62 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    version: '2.2'
    services:
    elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2
    container_name: elasticsearch
    restart: always
    environment:
    - cluster.name=docker-cluster
    - bootstrap.memory_lock=true
    - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    - http.cors.enabled=true
    - http.cors.allow-origin=*
    - http.cors.allow-methods=OPTIONS,HEAD,GET,POST,PUT,DELETE
    - http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
    ulimits:
    memlock:
    soft: -1
    hard: -1
    volumes:
    - esdata1:/usr/share/elasticsearch/data
    ports:
    - 9200:9200
    networks:
    - esnet
    elasticsearch2:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.2
    container_name: elasticsearch2
    restart: always
    environment:
    - cluster.name=docker-cluster
    - bootstrap.memory_lock=true
    - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    - "discovery.zen.ping.unicast.hosts=elasticsearch"
    - http.cors.enabled=true
    - http.cors.allow-origin=*
    - http.cors.allow-methods=OPTIONS,HEAD,GET,POST,PUT,DELETE
    - http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
    ulimits:
    memlock:
    soft: -1
    hard: -1
    volumes:
    - esdata2:/usr/share/elasticsearch/data
    networks:
    - esnet
    kibana:
    image: docker.elastic.co/kibana/kibana:6.4.2
    container_name: kibana
    restart: always
    ports:
    - 5601:5601
    networks:
    - esnet

    volumes:
    esdata1:
    driver: local
    esdata2:
    driver: local

    networks:
    esnet: