Skip to content

Commit

Permalink
HEALTHCHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
John Dutchover committed Dec 11, 2023
1 parent 4b31c28 commit b459b73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ COPY app/ ./app/
# Make port 8000 available to the world outside this container
EXPOSE 8000

HEALTHCHECK --interval=5m --timeout=3s \
--start-period=1m \
CMD curl --fail http://localhost:8000/docs || exit 1

# Run app.main when the container launches
CMD ["python", "-m", "app.main"]
# For k8s
Expand Down
6 changes: 6 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,11 @@ COPY app/ ./app/
# Make port 8000 available to the world outside this container
EXPOSE 8000

HEALTHCHECK --interval=5m --timeout=3s \
--start-period=1m \
CMD curl --fail http://localhost:8000/docs || exit 1

# Run app.main when the container launches
CMD ["python", "-m", "app.main"]
# For k8s
ENV APP_MODULE=app.main

0 comments on commit b459b73

Please sign in to comment.