FROM mcr.microsoft.com/playwright:v1.59.1-noble ENV CI=true \ E2E_MODE=start \ PNPM_HOME=/pnpm \ PATH=/pnpm:$PATH RUN corepack enable && corepack prepare pnpm@9.15.4 --activate WORKDIR /repo COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./ COPY common/package.json common/package.json COPY editor/package.json editor/package.json COPY export/package.json export/package.json RUN pnpm install --frozen-lockfile COPY . . # The editor's playwright.config starts an export dev server (it serves the # server-rendered footer/branding during editor e2e). That server reads # export/public/summaries/manifest.json on render — a GENERATED artifact, and one # .dockerignore deliberately excludes, so it is never in this image. Without it # every shard's export server 500s on its readiness URL and playwright dies with # "Timed out waiting 120000ms from config.webServer", i.e. the whole sharded # route fails before running a single test. Host runs only work because that file # happens to exist in the working copy from a previous build. # # Seed a valid empty-site manifest so the container is self-sufficient. Tests # that need real summaries stub them per-request with page.route. RUN mkdir -p export/public/summaries && \ printf '%s\n' '{"version":3,"totalCount":0,"pageSize":1000,"pageCount":0,"generatedAt":"2026-01-01T00:00:00.000Z","channels":[],"groups":[],"defaultGroupId":"default","siteId":"testsite"}' \ > export/public/summaries/manifest.json RUN pnpm --filter editor exec next build WORKDIR /repo/editor CMD ["pnpm", "exec", "playwright", "test"]