Skip to content

Commit 45f51e1

Browse files
authored
feat(docker): add healthcheck to monitor application status (#172)
1 parent 65799a9 commit 45f51e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
ARG IMAGE_TAG=3.21
2-
FROM --platform=$TARGETPLATFORM ghcr.io/linuxserver/baseimage-alpine:${IMAGE_TAG} AS runtime
2+
FROM ghcr.io/linuxserver/baseimage-alpine:${IMAGE_TAG} AS runtime
33

44
WORKDIR /app
55

66
COPY ./autopulse /bin
77

88
ENV S6_AUTOPULSE_DIR=/etc/s6-overlay/s6-rc.d/svc-autopulse
99

10+
HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=3 CMD wget --quiet --tries=1 --spider http://127.0.0.1:${AUTOPULSE__APP__PORT:-2875}/stats || exit 1
11+
1012
RUN mkdir -p $S6_AUTOPULSE_DIR && \
1113
echo '#!/usr/bin/with-contenv bash' >> $S6_AUTOPULSE_DIR/run && \
1214
echo '# shellcheck shell=bash' >> $S6_AUTOPULSE_DIR/run && \

0 commit comments

Comments
 (0)