mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +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
44 lines
987 B
YAML
44 lines
987 B
YAML
services:
|
|
# Angular development server for E2E tests
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.e2e.dev
|
|
ports:
|
|
- '${APP_PORT:-4242}:${APP_PORT:-4242}'
|
|
environment:
|
|
- APP_PORT=${APP_PORT:-4242}
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-sf', 'http://localhost:${APP_PORT:-4242}']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 30
|
|
start_period: 120s
|
|
|
|
# WebDAV sync server (for sync tests)
|
|
webdav:
|
|
image: hacdias/webdav:latest
|
|
ports:
|
|
- '${WEBDAV_PORT:-2345}:${WEBDAV_PORT:-2345}'
|
|
environment:
|
|
- PORT=${WEBDAV_PORT:-2345}
|
|
volumes:
|
|
- ./webdav.yaml:/config.yml:ro
|
|
- webdav_data:/data
|
|
healthcheck:
|
|
test:
|
|
[
|
|
'CMD',
|
|
'wget',
|
|
'--quiet',
|
|
'--tries=1',
|
|
'--spider',
|
|
'http://localhost:${WEBDAV_PORT:-2345}/',
|
|
]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
webdav_data:
|