FROM node:22-alpine RUN addgroup -g 1001 -S nodejs && \ adduser -S nodeuser -u 1001 WORKDIR /app COPY package*.json ./ RUN npm ci --only=production && \ npm cache clean --force COPY index.js ./ EXPOSE 3000 LABEL maintainer="joris.bertomeu@gmail.com" \ version="1.0" \ description="Gateway ICS pour Home Assistant" ENV NODE_ENV=production \ PORT=3000 HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1 CMD ["node", "index.js"]