Skip to content

Commit

Permalink
Minimal builtin health check
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpunk authored and gdubicki committed Jun 1, 2022
1 parent b0ae864 commit 428d05b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ FROM python:3.9-alpine

ENV PUPPETBOARD_PORT 80
ENV PUPPETBOARD_HOST 0.0.0.0
ENV PUPPETBOARD_STATUS_ENDPOINT /status

EXPOSE 80

HEALTHCHECK --interval=5m --timeout=5s --start-period=10s CMD python3 "import requests; import sys; sys.exit(not requests.get('http://localhost:${PUPPETBOARD_PORT}${PUPPETBOARD_URL_PREFIX:-}${PUPPETBOARD_STATUS_ENDPOINT}').ok)"

ENV PUPPETBOARD_SETTINGS docker_settings.py
RUN mkdir -p /usr/src/app/
WORKDIR /usr/src/app/
Expand Down

0 comments on commit 428d05b

Please sign in to comment.