From e5106f6b322eb353028d48eba57d0698f4075319 Mon Sep 17 00:00:00 2001 From: MartinG <6207345+MartinRaiola@users.noreply.github.com> Date: Thu, 9 Dec 2021 11:51:25 +0100 Subject: [PATCH] Improve docker-compose.yml Hello, I have updated the docker-compose file with some improvements: - ElasticSearch version update - Added healtcheck to ElasticSearch - We improved the dependency on parsedmarc to wait for ElasticSearch --- docker-compose.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5b20b30..38ec0bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,13 +7,29 @@ services: - ./output_files:/output command: parsedmarc -c /parsedmarc.ini /input/* depends_on: - - elasticsearch - restart: on-failure + elasticsearch: + condition: service_healthy + restart: always elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.9.1 + image: docker.elastic.co/elasticsearch/elasticsearch:7.15.1 environment: + - cluster.name=parsedmarc - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - xpack.security.enabled=false # required to prevent warnings in kibana dashboard. Security is not required as we're only operating docker-internally + ulimits: + memlock: + soft: -1 + hard: -1 + restart: always + healthcheck: + test: [ "CMD", "curl","-s" ,"-f", "http://localhost:9200/_cat/health" ] + interval: 1m + timeout: 10s + retries: 3 + start_period: 30s grafana: build: ./grafana/