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
This commit is contained in:
Gilles De Mey
2023-06-05 17:14:17 +02:00
committed by GitHub
parent 7871052899
commit 2245f3144d

View File

@@ -5,6 +5,11 @@
- ./docker/blocks/loki/loki-config.yaml:/etc/loki/loki-config.yaml - ./docker/blocks/loki/loki-config.yaml:/etc/loki/loki-config.yaml
ports: ports:
- "3100:3100" - "3100:3100"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3100/ready"]
interval: 30s
timeout: 10s
retries: 5
loki-data: loki-data:
build: docker/blocks/loki/data build: docker/blocks/loki/data
@@ -13,4 +18,4 @@
- loki - loki
# when loki starts, there might be some time while it is not # when loki starts, there might be some time while it is not
# accepting requests, so we allow data.js to restart on failure. # accepting requests, so we allow data.js to restart on failure.
restart: "on-failure" restart: "on-failure"