fix(security): USER node + HEALTHCHECK in production stage (SEC-013/F9/F11)

This commit is contained in:
admin-valentin 2026-07-31 14:57:01 +00:00
parent 97c32222ce
commit 7d43bc6b70

View file

@ -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"]