Spaces:
Build error
Build error
| # Use official Node.js image | |
| FROM node:18 | |
| # Set working directory | |
| WORKDIR /usr/src/app | |
| # Install system dependencies for Puppeteer | |
| RUN apt-get update && apt-get install -y \ | |
| ca-certificates \ | |
| fonts-liberation \ | |
| libappindicator3-1 \ | |
| libasound2 \ | |
| libatk-bridge2.0-0 \ | |
| libatk1.0-0 \ | |
| libcups2 \ | |
| libdbus-1-3 \ | |
| libdrm2 \ | |
| libgbm1 \ | |
| libgtk-3-0 \ | |
| libnspr4 \ | |
| libnss3 \ | |
| libx11-xcb1 \ | |
| libxcomposite1 \ | |
| libxdamage1 \ | |
| libxrandr2 \ | |
| libxss1 \ | |
| libxtst6 \ | |
| lsb-release \ | |
| xdg-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy package files | |
| COPY package*.json ./ | |
| # Install Node.js dependencies | |
| RUN npm install | |
| # Copy application code | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Start application | |
| CMD ["npm", "start"] | |