observability: fix alloy ui component, busybox healthchecks for loki/alloy
- alloy 1.x renamed the server component to ui; the old block failed the initial load and the container crash-looped - grafana/loki is distroless and grafana/alloy lacks wget, so their healthchecks could never run; local images add a static busybox from alpine for that one command - deploy.sh builds all three local images if missing - tests: 3 new seams
This commit is contained in:
1 parent
816986139f
commit
1f4766f233
6 files changed
+76
-11
No files matched your search
@@ -0,0 +1,15 @@
|
||||
# Alloy + a static busybox.
|
||||
#
|
||||
# grafana/alloy has a shell but no wget/curl, so the compose healthcheck
|
||||
# cannot run anything inside the container. This image drops a static
|
||||
# busybox into it for the healthcheck command only. All Alloy behavior is
|
||||
# unchanged.
|
||||
#
|
||||
# Build on dankclaw:
|
||||
# podman build -t franksdank/alloy:latest -f dankclaw/alloy/Containerfile .
|
||||
|
||||
FROM docker.io/library/alpine:latest AS tools
|
||||
# busybox provides wget for the healthcheck.
|
||||
|
||||
FROM docker.io/grafana/alloy:latest
|
||||
COPY --from=tools /bin/busybox /usr/local/bin/busybox
|
||||
@@ -149,7 +149,8 @@ services:
|
||||
retries: 3
|
||||
|
||||
loki:
|
||||
image: docker.io/grafana/loki:latest
|
||||
# Local build: grafana/loki + static busybox (healthcheck).
|
||||
image: franksdank/loki:latest
|
||||
container_name: loki
|
||||
restart: unless-stopped
|
||||
# Rootless: container root maps to the invoking user (dank), which
|
||||
@@ -163,13 +164,14 @@ services:
|
||||
- /opt/loki/config:/etc/loki
|
||||
- /opt/loki/data:/loki
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"]
|
||||
test: ["CMD", "/usr/local/bin/busybox", "wget", "--spider", "-q", "http://localhost:3100/ready"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
alloy:
|
||||
image: docker.io/grafana/alloy:latest
|
||||
# Local build: grafana/alloy + static busybox (healthcheck).
|
||||
image: franksdank/alloy:latest
|
||||
container_name: alloy
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@@ -180,7 +182,7 @@ services:
|
||||
depends_on:
|
||||
- loki
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:12345/-/healthy"]
|
||||
test: ["CMD", "/usr/local/bin/busybox", "wget", "--spider", "-q", "http://localhost:12345/-/healthy"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
# Loki + a static busybox.
|
||||
#
|
||||
# grafana/loki is distroless: no shell, no wget, so the compose healthcheck
|
||||
# cannot run anything inside the container. This image drops a static
|
||||
# busybox into it for the healthcheck command only. All Loki behavior is
|
||||
# unchanged.
|
||||
#
|
||||
# Build on dankclaw:
|
||||
# podman build -t franksdank/loki:latest -f dankclaw/loki/Containerfile .
|
||||
|
||||
FROM docker.io/library/alpine:latest AS tools
|
||||
# busybox provides wget for the healthcheck.
|
||||
|
||||
FROM docker.io/grafana/loki:latest
|
||||
COPY --from=tools /bin/busybox /usr/local/bin/busybox
|
||||
Reference in new issue
Block a user