super-productivity/Dockerfile.e2e.dev
Johannes Millan 40d7118e17 feat(e2e): add Docker-based E2E test isolation
Add Docker setup for running E2E tests with the Angular dev server
containerized while Playwright runs on the host. Supports multiple
instances via configurable ports.

New files:
- Dockerfile.e2e.dev: Dev server image
- docker-compose.e2e.yaml: E2E orchestration config
- scripts/wait-for-app.sh: Health check script

New npm scripts:
- e2e:docker: Run E2E with containerized app
- e2e:docker:webdav: Same but includes WebDAV for sync tests

Usage: APP_PORT=4343 npm run e2e:docker
2026-01-04 17:09:39 +01:00

20 lines
550 B
Text

FROM node:22-bookworm
# Install Angular CLI globally and curl for healthcheck
RUN npm install -g @angular/cli && apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy everything (source needed for prepare script during npm install)
COPY . .
# Install dependencies
RUN npm install --legacy-peer-deps
# Default port (can be overridden via environment variable)
ENV APP_PORT=4242
EXPOSE ${APP_PORT}
# Start Angular dev server with dynamic port
CMD ["sh", "-c", "ng serve --port ${APP_PORT} --host 0.0.0.0"]