From 7d43bc6b709f6ff794eaf6ac18163d39ed08851e Mon Sep 17 00:00:00 2001 From: admin-valentin Date: Fri, 31 Jul 2026 14:57:01 +0000 Subject: [PATCH] fix(security): USER node + HEALTHCHECK in production stage (SEC-013/F9/F11) --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 77e2284..574e25b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,9 @@ ENV NODE_ENV=production COPY package.json package-lock.json ./ RUN npm ci --legacy-peer-deps --omit=dev COPY --from=build /app/dist ./dist +RUN chown -R node:node /app +USER node EXPOSE 3001 +HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ + CMD wget -qO- http://localhost:3001/health || exit 1 CMD ["node", "dist/main"]