Provide overridable default memory setting

This commit is contained in:
dave 2017-04-21 00:36:14 -07:00
parent f92eef4cdf
commit 29495fb84b
3 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ RUN apt-get update ;\
curl -o /tmp/elasticsearch.deb "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.3.1.deb" ;\
dpkg -i /tmp/elasticsearch.deb ;\
rm /tmp/elasticsearch.deb ;\
sed -i -E 's/(\-Xm.[0-9]g)/#\1/' /etc/elasticsearch/jvm.options ;\
rm -rf /var/lib/apt/lists/*
ADD elasticsearch.conf /etc/supervisor/conf.d/elasticsearch.conf

View File

@ -15,3 +15,4 @@ Note: you'll need to increase vm.max_map_count; Elasticsearch will demand it. Ei
* Override default config file: `-v /data/myconfig.yml:/etc/elasticsearch/elasticsearch.yml`
* Data is stored in `/var/lib/elasticsearch`
* Set memory limit like so: `-e "ES_JAVA_OPTS=-Xms8G -Xmx8G"

2
start
View File

@ -1,5 +1,7 @@
#!/bin/sh
export ES_JAVA_OPTS="${ES_JAVA_OPTS:--Xms1G -Xmx1G}"
exec /usr/share/elasticsearch/bin/elasticsearch \
-p /var/run/elasticsearch/elasticsearch.pid \
-E default.path.home=/usr/share/elasticsearch \