Skip to content

Commit

Permalink
Add healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Oct 20, 2023
1 parent b2b115e commit b9f1d4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:labs
# syntax=docker/dockerfile:1.6

# 0. Prepare images
ARG PYTHON_VERSION="3.11"
Expand Down Expand Up @@ -61,3 +61,6 @@ VOLUME /config
WORKDIR /config

CMD ["go2rtc", "-config", "/config/go2rtc.yaml"]

HEALTHCHECK --start-period=10s --start-interval=2s --interval=30s --timeout=10s --retries=3 \
CMD curl --fail --silent --show-error --output /dev/null http://127.0.0.1:1984/api || exit 1
5 changes: 4 additions & 1 deletion hardware.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:labs
# syntax=docker/dockerfile:1.6

# 0. Prepare images
# only debian 12 (bookworm) has latest ffmpeg
Expand Down Expand Up @@ -64,3 +64,6 @@ ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,video,utility

CMD ["go2rtc", "-config", "/config/go2rtc.yaml"]

HEALTHCHECK --start-period=10s --start-interval=2s --interval=30s --timeout=10s --retries=3 \
CMD curl --fail --silent --show-error --output /dev/null http://127.0.0.1:1984/api/ || exit 1

0 comments on commit b9f1d4f

Please sign in to comment.