Complete E2E Docker migration (Steps 1-3):
1. Add SPA routing support in nginx (try_files directive)
2. Make APP_PORT configurable via environment variable
3. Migrate docker-compose.e2e.yaml from dev server to production build
Changes:
- docker-compose.e2e.yaml: Use production Dockerfile instead of dev server
- Remove volume mounts (self-contained production build)
- Add UNSPLASH build args
- Add WEBDAV_BACKEND environment variable
- Reduce healthcheck start_period from 120s to 30s (nginx is faster)
- nginx/default.conf.template: Add try_files for SPA routing, use APP_PORT
- docker-entrypoint.sh: Export APP_PORT with default value
Benefits:
- Production build provides more realistic test environment
- Faster startup (30s vs 120s)
- No dependency on local node_modules
- Matches production deployment more closely
docker-compose.e2e.yaml was failing when used standalone because the
supersync service only had a port override without a base definition.
Split into separate files so e2e:docker:webdav works without errors.
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
Docker-compose merges arrays by default, so both port 1900 and 1901
were being mapped. Using !override ensures only port 1901 is used
for e2e tests, allowing them to run alongside the dev server on 1900.
Previously, flushYoungToOld was dispatched as an action and handled by
an NgRx effect. This caused a race condition during finish day:
1. Action dispatched, effect queued
2. Method returned, sync started, DB locked
3. Effect ran, tried to write, blocked by DB lock
Fix follows the same pattern as moveToArchive:
- Perform the flush synchronously in ArchiveService before dispatching
- Dispatch action for op-log capture only (syncs to other clients)
- Handler skips local operations (only runs for remote)
Also adds comprehensive unit tests and e2e test for this scenario.