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