-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
29 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
version: "2" | ||
version: "2.1" | ||
services: | ||
elasticsearch: | ||
build: es | ||
mem_limit: 4g | ||
ports: | ||
- "9200:9200" | ||
- "9300:9300" | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
volumes: | ||
- ./es/data/:/usr/share/elasticsearch/data/ | ||
- ./es/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml | ||
- ./es/config/logging.yml:/usr/share/elasticsearch/config/logging.yml | ||
- ./es/config/userdict_ja.txt:/usr/share/elasticsearch/config/userdict_ja.txt | ||
- ./es/logs/:/var/log/elasticsearch/ | ||
environment: | ||
- "ES_JAVA_OPTS: -Xmx2048m -Xms2048m" | ||
- "ES_JAVA_OPTS=-Xms1g -Xmx1g" | ||
- bootstrap.memory_lock=true | ||
- xpack.security.enabled=false | ||
- xpack.graph.enabled=false | ||
- xpack.ml.enabled=false | ||
- xpack.monitoring.enabled=true | ||
- xpack.watcher.enabled=false | ||
|
||
kibana: | ||
image: seeruk/docker-kibana-sense:4.6 | ||
image: docker.elastic.co/kibana/kibana:6.1.4 | ||
ports: | ||
- "5601:5601" | ||
environment: | ||
- ELASTICSEARCH_URL=http://elasticsearch:9200 | ||
- xpack.security.enabled=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,6 @@ | ||
FROM frolvlad/alpine-oraclejdk8 | ||
FROM docker.elastic.co/elasticsearch/elasticsearch:6.1.3 | ||
|
||
# ensure elasticsearch user exists | ||
RUN addgroup -S elasticsearch && adduser -S -G elasticsearch elasticsearch | ||
|
||
# grab su-exec for easy step-down from root | ||
# and bash for "bin/elasticsearch" among others | ||
RUN apk add --no-cache 'su-exec>=0.2' bash | ||
|
||
# https://artifacts.elastic.co/GPG-KEY-elasticsearch | ||
ENV GPG_KEY 46095ACC8548582C1A2699A9D27D666CD88E42B4 | ||
|
||
WORKDIR /usr/share/elasticsearch | ||
ENV PATH /usr/share/elasticsearch/bin:$PATH | ||
|
||
ENV ELASTICSEARCH_VERSION 2.4.6 | ||
ENV ELASTICSEARCH_TARBALL="https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.4.6.tar.gz" \ | ||
ELASTICSEARCH_TARBALL_ASC="https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.4.6.tar.gz.asc" \ | ||
ELASTICSEARCH_TARBALL_SHA1="c3441bef89cd91206edf3cf3bd5c4b62550e60a9" | ||
|
||
RUN set -ex; \ | ||
\ | ||
apk add --no-cache --virtual .fetch-deps \ | ||
ca-certificates \ | ||
gnupg \ | ||
openssl \ | ||
tar \ | ||
; \ | ||
\ | ||
wget -O elasticsearch.tar.gz "$ELASTICSEARCH_TARBALL"; \ | ||
\ | ||
if [ "$ELASTICSEARCH_TARBALL_SHA1" ]; then \ | ||
echo "$ELASTICSEARCH_TARBALL_SHA1 *elasticsearch.tar.gz" | sha1sum -c -; \ | ||
fi; \ | ||
\ | ||
if [ "$ELASTICSEARCH_TARBALL_ASC" ]; then \ | ||
wget -O elasticsearch.tar.gz.asc "$ELASTICSEARCH_TARBALL_ASC"; \ | ||
export GNUPGHOME="$(mktemp -d)"; \ | ||
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY"; \ | ||
gpg --batch --verify elasticsearch.tar.gz.asc elasticsearch.tar.gz; \ | ||
rm -rf "$GNUPGHOME" elasticsearch.tar.gz.asc; \ | ||
fi; \ | ||
\ | ||
tar -xf elasticsearch.tar.gz --strip-components=1; \ | ||
rm elasticsearch.tar.gz; \ | ||
\ | ||
apk del .fetch-deps; \ | ||
\ | ||
mkdir -p ./plugins; \ | ||
for path in \ | ||
./data \ | ||
./logs \ | ||
./config \ | ||
./config/scripts \ | ||
; do \ | ||
mkdir -p "$path"; \ | ||
chown -R elasticsearch:elasticsearch "$path"; \ | ||
done; \ | ||
\ | ||
# we shouldn't need much RAM to test --version (default is 2gb, which gets Jenkins in trouble sometimes) | ||
export ES_JAVA_OPTS='-Xms32m -Xmx32m'; \ | ||
if [ "${ELASTICSEARCH_VERSION%%.*}" -gt 1 ]; then \ | ||
elasticsearch --version; \ | ||
else \ | ||
# elasticsearch 1.x doesn't support --version | ||
# but in 5.x, "-v" is verbose (and "-V" is --version) | ||
elasticsearch -v; \ | ||
fi | ||
|
||
COPY config ./config | ||
|
||
VOLUME /usr/share/elasticsearch/data | ||
|
||
COPY docker-entrypoint.sh / | ||
|
||
EXPOSE 9200 9300 | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["elasticsearch"] | ||
|
||
RUN bin/plugin install analysis-kuromoji | ||
RUN bin/plugin install analysis-icu | ||
RUN bin/plugin install analysis-smartcn | ||
RUN bin/plugin install analysis-stempel | ||
RUN bin/plugin install royrusso/elasticsearch-HQ/v2.0.3 | ||
RUN elasticsearch-plugin install analysis-kuromoji | ||
RUN elasticsearch-plugin install analysis-icu | ||
RUN elasticsearch-plugin install analysis-smartcn | ||
RUN elasticsearch-plugin install analysis-stempel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters