Add elastic search
This commit is contained in:
parent
17fd20d1ca
commit
af6d1a3272
@ -10,7 +10,7 @@ for _var in ${REQUIRED_VARIABLES[@]}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
source ${SCRIPT_PATH}/../settings.shinc
|
source ${SCRIPT_PATH}/../settings.shinc
|
||||||
source ${SCRIPT_PATH}/../env.shinc
|
source ${SCRIPT_PATH}/../env.shinc 2> /dev/null
|
||||||
|
|
||||||
source ${SCRIPT_PATH}/../functions.shinc
|
source ${SCRIPT_PATH}/../functions.shinc
|
||||||
|
|
||||||
|
|||||||
11
elastic-search/Dockerfile
Normal file
11
elastic-search/Dockerfile
Normal 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
|
||||||
12
elastic-search/elasticsearch.yml
Normal file
12
elastic-search/elasticsearch.yml
Normal 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
42
elastic-search/run.sh
Executable 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 $?
|
||||||
@ -16,6 +16,8 @@ DB_NETWORK="database"
|
|||||||
# Mail
|
# Mail
|
||||||
SMTP_NETWORK="smtp"
|
SMTP_NETWORK="smtp"
|
||||||
|
|
||||||
|
# Elastic search
|
||||||
|
SEARCH_ENGINE_NETWORK="elastic"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user