From 671f5fe0a90d3f821f7482bbe848b8b0cb2c6b4c Mon Sep 17 00:00:00 2001 From: Nuttapon Pramoolsin Date: Thu, 18 Jul 2024 22:59:48 +0700 Subject: [PATCH] COD-85 - added healthcheck --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index aceb88b..d7cd73c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,10 @@ RUN apk --no-cache add ca-certificates COPY --from=builder /app/proposal_monitor . COPY --from=builder /app/config/config.yml ./config/config.yml +# Defind healthcheck +HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \ + CMD curl -f http://localhost/health || exit 1 + EXPOSE 8080 # Run the compiled application