FROM node:20-alpine
RUN apk add --no-cache \
    chromium \
    nss \
    freetype \
    freetype-dev \
    harfbuzz \
    ca-certificates \
    ttf-freefont
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
ENV PLAYWRIGHT_BROWSERS_PATH=/usr/bin/chromium-browser
EXPOSE 4000
CMD ["npm", "start"]
