FROM node:20-alpine ENV NODE_ENV=production WORKDIR /app COPY package*.json ./ RUN apk add --no-cache curl && npm install --omit=dev COPY . . RUN chown -R node:node /app USER node EXPOSE 4000 HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ CMD curl -f http://localhost:4000/health || exit 1 CMD ["node", "index.js"]