# Use official Node.js runtime as base image FROM node:18-alpine # Install Chromium and dependencies for Puppeteer RUN apk add --no-cache \ chromium \ nss \ freetype \ freetype-dev \ harfbuzz \ ca-certificates \ ttf-freefont # Tell Puppeteer to skip installing Chromium. We'll be using the installed package. ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \ PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser # Set working directory WORKDIR /app # Copy package files COPY package*.json ./ # Install dependencies RUN npm ci --only=production # Copy application code COPY . . # Create data directory RUN mkdir -p data # Set database path ENV DB_PATH=/app/data/ratings.db # Expose port EXPOSE 3000 # Start the application CMD ["npm", "start"]