platform-codebase/features/messaging/backend-api/e2e/Dockerfile

36 lines
719 B
Docker

# Web-only E2E Dockerfile for messaging API
#
# Usage:
# docker build -f e2e/Dockerfile -t messaging-api-e2e .
# docker run --rm -v $(pwd)/test-results:/app/test-results messaging-api-e2e
FROM mcr.microsoft.com/playwright:v1.57.0-noble
# Set working directory
WORKDIR /app
# Install pnpm
RUN corepack enable && corepack prepare pnpm@9 --activate
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source code
COPY . .
# Build the application
RUN pnpm build
# Set environment
ENV CI=true
ENV NODE_ENV=test
ENV API_URL=http://localhost:3010
# Create test results directory
RUN mkdir -p test-results
# Run tests
CMD ["pnpm", "test:e2e"]