platform-codebase/features/platform-analytics/frontend-platform/playwright-e2e.Dockerfile
Lilith dcae150ea6 chore: snapshot before monorepo consolidation
Capture current working state before converting platform-codebase
into a submodule of the lilith-platform monorepo.
2026-01-29 07:04:30 -08:00

45 lines
1.4 KiB
Docker

# Playwright E2E Dockerfile for Platform Analytics Frontend
#
# Web-only E2E testing (no Xvfb/Electron needed).
# Uses official Microsoft Playwright base image with all browsers pre-installed.
#
# Usage:
# docker build -f playwright-e2e.Dockerfile -t platform-analytics-e2e ../../../..
# docker run --rm -v $(pwd)/test-results:/app/test-results platform-analytics-e2e
#
# Or use docker-compose:
# docker compose -f docker-compose.e2e.yml up --build --abort-on-container-exit
FROM mcr.microsoft.com/playwright:v1.57.0-noble
# Set working directory to monorepo root
WORKDIR /app
# Install pnpm (matching workspace version)
RUN corepack enable && corepack prepare pnpm@9 --activate
# Copy workspace configuration files from monorepo root
COPY package.json ./
# Copy the entire codebase directory (contains features and @packages)
COPY codebase/ ./codebase/
# Install all dependencies from monorepo root
# This ensures workspace dependencies are correctly linked
RUN pnpm install --frozen-lockfile --filter "@lilith/platform-analytics-platform..."
# Set working directory to the feature
WORKDIR /app/codebase/features/platform-analytics/frontend-platform
# Build the application
RUN pnpm build
# Set environment variables
ENV CI=true
ENV NODE_ENV=test
# Create test results directory
RUN mkdir -p test-results playwright-report
# Run Playwright tests
CMD ["pnpm", "test:e2e"]