Documentation
adrs/048-agent-driven-dev-stack.md
ADR-048: Agent-Driven Local Dev Stack with Docker Compose and Playwright
Status
Proposed
Context
- Aspire + Dynaplex services (notably the bbu-rfid project) are iterated on by multiple agents who currently rely on manual rebuild/restart cycles via IDE or CLI.
- The host and services must remain visible and controllable on the developer machine (no hidden temp locations) so humans can inspect and override when needed.
- Agents need a deterministic way to roll new builds into the running stack and must always exercise Playwright UI tests after changes.
- We need a shared, local workflow that automates rebuild/deploy while retaining observability and avoiding per-agent bespoke setups.
Decision
Adopt a containerized dev workflow with Docker Compose (or Tilt where available) to orchestrate the Aspire AppHost and all bbu-rfid services, plus an always-on Playwright gate:
- Create dev-focused Dockerfiles for the Aspire AppHost (
projects/bbu-rfid/src/Acsis.Dynaplex.Projects.BbuRfid) and each bbu-rfid component usingacsis-core.slnxas the build context; expose fixed ports and mount logs/config from a known repo folder. - Author
docker-compose.dev.ymlthat runs the AppHost and bbu-rfid services, includes named volumes for data (e.g., PostgreSQL), and aui-testsservice that packages Playwright tests fromengines/assettrak-ui/src/acsis-assettrak-uiwith cachednode_modulesvolume. - Provide helper scripts under a visible
/devfolder:./dev/up→docker compose -f docker-compose.dev.yml up -d --buildto start the full stack../dev/reload <service>→ rebuild the target image, restart that service, and then rundocker compose run --rm ui-testsso Playwright always executes after a change; failures stop promotion.
- Enable live iteration via
docker compose watch(preferred) or Tilt resources: watchengines/<domain>/srcpaths, rebuild images on change, and/or mount source to supportdotnet watch runwhere hot reload is viable. - Keep all container state and logs in named volumes and repo-mounted folders so service health and output remain inspectable (
docker compose ps/logs).
Consequences
- Pros: Single, reproducible dev stack; agents can self-serve rebuilds without local manual steps; UI regression coverage enforced via Playwright on every reload; consistent ports, logs, and config locations visible to the developer.
- Cons/Costs: Requires maintaining dev Dockerfiles and compose definitions; rebuild cycles may be slower than pure
dotnet watch; needs Docker Compose v2.17+ (or Tilt) forwatch; local resource usage increases when all services and Playwright run together.