From 2245f3144d0f2bae4cf7c0277ad75283b4b3441b Mon Sep 17 00:00:00 2001 From: Gilles De Mey Date: Mon, 5 Jun 2023 17:14:17 +0200 Subject: [PATCH] devenv: add healthcheck to loki block (#69519) add healthcheck to loki this prevents loki-data from failing and restarting while the ingester is getting ready --- devenv/docker/blocks/loki/docker-compose.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/devenv/docker/blocks/loki/docker-compose.yaml b/devenv/docker/blocks/loki/docker-compose.yaml index b4985f53085..4495dc81057 100644 --- a/devenv/docker/blocks/loki/docker-compose.yaml +++ b/devenv/docker/blocks/loki/docker-compose.yaml @@ -5,6 +5,11 @@ - ./docker/blocks/loki/loki-config.yaml:/etc/loki/loki-config.yaml ports: - "3100:3100" + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1:3100/ready"] + interval: 30s + timeout: 10s + retries: 5 loki-data: build: docker/blocks/loki/data @@ -13,4 +18,4 @@ - loki # when loki starts, there might be some time while it is not # accepting requests, so we allow data.js to restart on failure. - restart: "on-failure" \ No newline at end of file + restart: "on-failure"