From 8f3e7c761624d1e809fcc8beb7047b1db9053ab6 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 14 Jul 2019 22:46:16 +0200 Subject: [PATCH] Initial commit. --- docker-compose.yml | 25 +++++++++++++++++++++++++ start_or_update.sh | 5 +++++ 2 files changed, 30 insertions(+) create mode 100644 docker-compose.yml create mode 100755 start_or_update.sh diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0cfb3d4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,25 @@ +version: '2.1' + +services: + + elasticsearch: + container_name: elasticsearch:$VERSION_ELASTICSEARCH + build: "https://git.scimetis.net/yohan/docker-elasticsearch.git" + environment: + - discovery.type=single-node + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + restart: always + expose: + - '9200' + - '9300' + networks: + - reverse-proxy + volumes: + - elasticsearch_data:/usr/share/elasticsearch/data + +networks: + reverse-proxy: + external: true + +volumes: + elasticsearch_data: diff --git a/start_or_update.sh b/start_or_update.sh new file mode 100755 index 0000000..aefd899 --- /dev/null +++ b/start_or_update.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# --force-recreate is used to recreate container when crontab file has changed +unset VERSION_ELASTICSEARCH +VERSION_ELASTICSEARCH=$(git ls-remote ssh://git@git.scimetis.net:2222/yohan/docker-elasticsearch.git| head -1 | cut -f 1|cut -c -10) \ + sudo -E bash -c 'docker-compose up -d --force-recreate'