We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 826c9b8 commit 6bc5f64Copy full SHA for 6bc5f64
2 files changed
15/Containerfile
@@ -46,6 +46,6 @@ RUN mkdir -p /etc/cont-init.d \
46
/run/s6/services
47
48
# Make scripts executable
49
-RUN chmod +x /init /etc/cont-init.d/* 2>/dev/null || true
+RUN chmod +x /init /healthz /etc/cont-init.d/* 2>/dev/null || true
50
51
ENTRYPOINT ["/init"]
15/root/healthz
@@ -0,0 +1,13 @@
1
+#!/bin/sh
2
+# Generic health check - uses HEALTHCHECK_URL env var
3
+# Override by placing custom /healthz in image's root/
4
+
5
+URL="${HEALTHCHECK_URL:-}"
6
+TIMEOUT="${HEALTHCHECK_TIMEOUT:-5}"
7
8
+if [ -z "$URL" ]; then
9
+ echo "HEALTHCHECK_URL not set" >&2
10
+ exit 1
11
+fi
12
13
+exec fetch -qo /dev/null -T "$TIMEOUT" "$URL"
0 commit comments