Fix: correct Playwright Docker tag, sequential Lighthouse audits, devtools throttling

- 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>
This commit is contained in:
Paul O'Reilly
2026-04-18 08:25:58 +12:00
parent 8584def154
commit 9fb87e08a2
5 changed files with 2239 additions and 10 deletions

View File

@@ -1,10 +1,10 @@
FROM mcr.microsoft.com/playwright/node:20-noble
FROM mcr.microsoft.com/playwright:v1.59.1-jammy
WORKDIR /app
# Install dependencies first (layer cache)
COPY package*.json ./
RUN npm ci --omit=dev
RUN PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm ci --omit=dev
# Copy source
COPY src/ ./src/