Skip to content

Commit

Permalink
feat: healtcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmetzger authored and fedirz committed Jan 19, 2025
1 parent 56d06d7 commit 44e6bc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL org.opencontainers.image.licenses="MIT"
# `ffmpeg` is installed because without it `gradio` won't work with mp3(possible others as well) files
# hadolint ignore=DL3008
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ffmpeg python3.12 && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl ffmpeg python3.12 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# "ubuntu" is the default user on ubuntu images with UID=1000. This user is used for two reasons:
Expand Down
6 changes: 6 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ services:
restart: unless-stopped
ports:
- 8000:8000
healthcheck:
test: ["CMD", "curl", "--fail", "http://0.0.0.0:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s

0 comments on commit 44e6bc3

Please sign in to comment.