/
Makefile
31 lines (23 loc) · 883 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(dir $(mkfile_path))
current_dir_name := $(notdir $(patsubst %/,%,$(current_dir)))
es_version := 6.8.3
run-es:
docker run --rm \
-e "cluster.name=docker-cluster" \
-e "ES_JAVA_OPTS=-Xms1024m -Xmx1024m" \
-e "cluster.routing.allocation.disk.threshold_enabled=false" \
-e "network.publish_host=127.0.0.1" \
-e "transport.publish_port=9200" \
-p 127.0.0.1:9200:9200 \
--name elasticsearch_zl_fhirapi \
docker.elastic.co/elasticsearch/elasticsearch-oss:$(es_version)
stop-all:
docker kill $$(docker ps -q)
clean-es:
curl -XDELETE 127.0.0.1:9200/_all
es-health:
curl -XGET http://127.0.0.1:9200/_cat/health
set-vm-map-count:
sysctl -w vm.max_map_count=262144
# curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'