Skip to content

Commit

Permalink
feat: set HEALTHCHECK directive in docker
Browse files Browse the repository at this point in the history
Signed-off-by: WoodenMaiden <yann.pomie@laposte.net>
  • Loading branch information
WoodenMaiden committed Jan 20, 2025
1 parent 15088d4 commit 06575b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN mix release
FROM ${RUNNER_IMAGE}

RUN apt-get update -y && \
apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \
apt-get install -y libstdc++6 openssl libncurses5 locales wget ca-certificates \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*

# Set the locale
Expand All @@ -89,4 +89,9 @@ USER nobody
# above and adding an entrypoint. See https://github.com/krallin/tini for details
# ENTRYPOINT ["/tini", "--"]

EXPOSE 8080

HEALTHCHECK --interval=5s --timeout=10s --start-period=5s --retries=3 \
CMD "wget -O http://localhost:8080/health/live 2> /dev/null"

CMD ["/app/bin/server"]

0 comments on commit 06575b5

Please sign in to comment.