mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-22 18:30:09 +00:00
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
20 lines
550 B
Text
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"]
|