Skip to content

Commit 06575b5

Browse files
committed
feat: set HEALTHCHECK directive in docker
Signed-off-by: WoodenMaiden <[email protected]>
1 parent 15088d4 commit 06575b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN mix release
6363
FROM ${RUNNER_IMAGE}
6464

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

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

92+
EXPOSE 8080
93+
94+
HEALTHCHECK --interval=5s --timeout=10s --start-period=5s --retries=3 \
95+
CMD "wget -O http://localhost:8080/health/live 2> /dev/null"
96+
9297
CMD ["/app/bin/server"]

0 commit comments

Comments
 (0)