Skip to content

Commit 0499d8c

Browse files
ChrisPC-39Sebastian
andauthored
Add healthcheck in Containerfile.lite (#441)
Signed-off-by: Sebastian <[email protected]> Co-authored-by: Sebastian <[email protected]>
1 parent 9800e3f commit 0499d8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Containerfile.lite

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ EXPOSE 4444
135135
# ----------------------------------------------------------------------------
136136
USER 1001
137137

138+
# ----------------------------------------------------------------------------
139+
# Health check
140+
# ----------------------------------------------------------------------------
141+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
142+
CMD ["python3", "-c", "import httpx,sys;sys.exit(0 if httpx.get('http://localhost:4444/health',timeout=5).status_code==200 else 1)"]
143+
138144
# ----------------------------------------------------------------------------
139145
# Entrypoint
140146
# ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)