LoginSignup
6
6

More than 5 years have passed since last update.

Elasticsearchとdocker-composeを使って開発したい時の記述

Last updated at Posted at 2017-06-16

docker-compose.yml

docker-compose.yml
version: '2'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:5.4.1
    environment:
      - xpack.security.enabled=false
      - http.host=0.0.0.0
      - http.cors.enabled=true
      - http.cors.allow-origin=*
      - http.cors.allow-methods=*
      - http.cors.allow-headers=*
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    volumes:
      - ./esdata/:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
      - 9300:9300
  elasticsearch-head:
    image: mobz/elasticsearch-head:5
    ports:
      - 9100:9100

上記をベースに、別のサービスを追加すると良いです。
(ちょっと無駄なhttp.cors系があるかもしれません・・・)

http://localhost:9100 でElasticsearch-headもついてきます。

Circle CI での起動

vm.max_map_countの設定を変えられなくてエラーが出るので
environmentに以下を追加

      - transport.host=localhost
      - bootstrap.system_call_filter=false

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6