commit 8f3e7c761624d1e809fcc8beb7047b1db9053ab6 Author: yohan <783b8c87@scimetis.net> Date: Sun Jul 14 22:46:16 2019 +0200 Initial commit. 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'