From 2ad1231d83b583b72add7ba46fe1e7cea0871dd4 Mon Sep 17 00:00:00 2001 From: Mike Conrad Date: Wed, 4 Jun 2025 21:06:39 -0400 Subject: [PATCH] Add healthcheck and update node version --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index eedd32e..03e20d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM node:22-alpine AS base +FROM node:lts-alpine3.22 AS base +HEALTHCHECK --interval=5s --timeout=10s --start-period=5s --retries=5 \ + CMD sh -c 'wget --no-verbose --tries=1 --spider http://127.0.0.1:3333 || exit 1' # All deps stage FROM base AS deps @@ -32,4 +34,5 @@ WORKDIR /app COPY --from=production-deps /app/node_modules /app/node_modules COPY --from=build /app/build /app EXPOSE 8080 + CMD ["node", "./bin/server.js"] \ No newline at end of file