Skip to content

Commit c22204e

Browse files
committed
Add healthcheck to Docker images
Add HEALTHCHECK instructions to both Dockerfile and Dockerfile.rootless using the existing /api/healthz endpoint to monitor service health.
1 parent 90cb5f9 commit c22204e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ LABEL maintainer="[email protected]"
4646

4747
EXPOSE 22 3000
4848

49+
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
50+
CMD curl -f http://localhost:3000/api/healthz || exit 1
51+
4952
RUN apk --no-cache add \
5053
bash \
5154
ca-certificates \

Dockerfile.rootless

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ LABEL maintainer="[email protected]"
4444

4545
EXPOSE 2222 3000
4646

47+
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
48+
CMD curl -f http://localhost:3000/api/healthz || exit 1
49+
4750
RUN apk --no-cache add \
4851
bash \
4952
ca-certificates \

0 commit comments

Comments
 (0)