Add elastic search

This commit is contained in:
Arnie 2018-01-04 06:56:20 +01:00
parent 17fd20d1ca
commit af6d1a3272
5 changed files with 68 additions and 1 deletions

View File

@ -10,7 +10,7 @@ for _var in ${REQUIRED_VARIABLES[@]}; do
done
source ${SCRIPT_PATH}/../settings.shinc
source ${SCRIPT_PATH}/../env.shinc
source ${SCRIPT_PATH}/../env.shinc 2> /dev/null
source ${SCRIPT_PATH}/../functions.shinc

11
elastic-search/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
ARG IMAGE_NAME
ARG IMAGE_VERSION
FROM ${IMAGE_NAME}:${IMAGE_VERSION}
ADD elasticsearch.yml /usr/share/elasticsearch/config/
USER root
RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
USER elasticsearch

View File

@ -0,0 +1,12 @@
http:
host: 0.0.0.0
transport:
host: 127.0.0.1
xpack:
security:
enabled: false
authc:
anonymous:
roles:
- role1
- role2

42
elastic-search/run.sh Executable file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env bash
SCRIPT_PATH=$( cd "$(dirname "$0")" ; pwd -P )
IMAGE_NAME="docker.elastic.co/elasticsearch/elasticsearch"
IMAGE_VERSION="5.3.2"
PROJECT_NAME=elastic-search
source ${SCRIPT_PATH}/../common.shinc
#
# Project specific variables
#
DOMAIN_NAME="elastic.loc"
init() {
__init
# Create networks
NETWORKS=(${SEARCH_ENGINE_NETWORK})
__createNetworks
__build || return $?
docker create \
--name ${PROJECT_NAME} \
-e VIRTUAL_HOST=${DOMAIN_NAME} \
--net ${SEARCH_ENGINE_NETWORK} \
${PROJECT_NAME}:latest
[[ $? -ne 0 ]] && return 1
__ask_to_start
}
"$@"
exit $?

View File

@ -16,6 +16,8 @@ DB_NETWORK="database"
# Mail
SMTP_NETWORK="smtp"
# Elastic search
SEARCH_ENGINE_NETWORK="elastic"