FROM mcr.microsoft.com/playwright:v1.58.2-noble

WORKDIR /app

COPY parser/package.json parser/package-lock.json ./parser/
WORKDIR /app/parser
RUN npm install
COPY parser/ ./

WORKDIR /app/parser
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 CMD ["node", "scripts/healthcheck.js"]
CMD ["npm", "run", "start"]
