docker-compose.yml
Â
ElasticSearch ããã¼ã«ã«èµ·åãã¦è²ã æ¤è¨¼ãã¦ã¿ããã¨æã£ã¦ Docker Compose ãã¡ã¤ã«ãç¨æãã
docker-compose up -d
ã§èµ·åãããã®ã®ãä¸è¨ã®ã¨ã©ã¼ã§èµ·åããã³ã³ãããåæ¢ãã¦ããã®ã§ããã®å¯¾å¦æ³ãã¾ã¨ãã¾ããã
Â
対å¿æ¹æ³
ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®éããElasticSearch ã³ã³ããã«å²ãå½ã¦ãããã¡ã¢ãªå®¹éãå°ãªãããã®ãåå ã®ãããªã®ã§ã
Â
vi /etc/sysctl.conf
ã§è¨å®ãã¡ã¤ã«ãéãã
Â
Â
vm.max_map_count=262144
ããã¡ã¤ã«æ«å°¾ã«è¿½å ãã¦
sudo sysctl -p
ã§å¤æ´ãåæ ããã
ãã®å¾å度ã
docker-compose up -d
ã§ElasticSearchã³ã³ãããèµ·åãããä»åº¦ã¯åæ¢ããèµ·åãã¾ããã
curl ã§ã¬ã¹ãã³ã¹ãå¾ããã¾ããã
Â
curl -X GET http://localhost:9200/
{
 "name" : "es01",
 "cluster_name" : "docker-cluster",
 "cluster_uuid" : "iGPg2pzlRpKqs6F80SSqDA",
 "version" : {
  "number" : "7.5.1",
  "build_flavor" : "default",
  "build_type" : "docker",
  "build_hash" : "3ae9ac9a93c95bd0cdc054951cf95d88e1e18d96",
  "build_date" : "2019-12-16T22:57:37.835892Z",
  "build_snapshot" : false,
  "lucene_version" : "8.3.0",
  "minimum_wire_compatibility_version" : "6.8.0",
  "minimum_index_compatibility_version" : "6.0.0-beta1"
 },
 "tagline" : "You Know, for Search"
}
Â
Â