FROM node:22-slim # Install Playwright system dependencies RUN apt-get update && apt-get install -y \ libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 \ libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \ libgbm1 libpango-1.0-0 libcairo2 libasound2 libatspi2.0-0 \ fonts-liberation fonts-noto-color-emoji \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci --omit=dev # Install Playwright Chromium as node user (matches runtime user) USER node RUN npx playwright install chromium COPY --chown=node:node server.js renderer.js refund.js network-config.js url-policy.js ./ ENV PORT=7860 EXPOSE 7860 CMD ["node", "server.js"]