FROM node:20-bullseye

WORKDIR /app

RUN apt-get update \
  && apt-get install -y libvips libheif-dev \
  && rm -rf /var/lib/apt/lists/*

COPY package*.json ./
RUN npm install --omit=dev

COPY . .

ENV NODE_ENV=production
EXPOSE 3000

CMD ["npm", "start"]
