added healthcheck

This commit is contained in:
Paolo Asperti 2022-06-20 15:22:42 +02:00
parent 26c845e248
commit d624e59021
No known key found for this signature in database
GPG Key ID: 06D46905D19D5182
2 changed files with 7 additions and 0 deletions

View File

@ -19,11 +19,14 @@ RUN \
COPY rootfs /
COPY --from=builder /src/target/release/hbbr /usr/bin/hbbr
COPY --from=builder /src/target/release/hbbs /usr/bin/hbbs
COPY healthcheck.sh /usr/bin/healthcheck.sh
ENV RELAY relay.example.com
EXPOSE 21115 21116 21116/udp 21117 21118 21119
HEALTHCHECK --interval=10s --timeout=5s CMD /usr/bin/healthcheck.sh
WORKDIR /data
VOLUME /data

4
docker/healthcheck.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
/package/admin/s6/command/s6-svstat /run/s6-rc/servicedirs/hbbr || exit 1
/package/admin/s6/command/s6-svstat /run/s6-rc/servicedirs/hbbs || exit 1