- Pin playwright npm to 1.59.1 to match Docker image tag - Update base image to mcr.microsoft.com/playwright:v1.59.1-jammy - Run Lighthouse desktop and mobile sequentially (parallel caused port conflict) - Switch to devtools throttling (simulate caused LanternError on localhost) - Skip browser download during npm ci (image has browsers pre-installed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 lines
392 B
Docker
19 lines
392 B
Docker
FROM mcr.microsoft.com/playwright:v1.59.1-jammy
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies first (layer cache)
|
|
COPY package*.json ./
|
|
RUN PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm ci --omit=dev
|
|
|
|
# Copy source
|
|
COPY src/ ./src/
|
|
|
|
# Create default output dir (overridden by volume mount at runtime)
|
|
RUN mkdir -p /output
|
|
|
|
ENV OUTPUT_DIR=/output
|
|
ENV NODE_ENV=production
|
|
|
|
ENTRYPOINT ["node", "src/index.js"]
|