Skip to content

feat(docker): add live reload workflow#6

Open
scotluns wants to merge 1 commit into
major-refactorfrom
feat/live-reload-dev-workflow
Open

feat(docker): add live reload workflow#6
scotluns wants to merge 1 commit into
major-refactorfrom
feat/live-reload-dev-workflow

Conversation

@scotluns
Copy link
Copy Markdown

@scotluns scotluns commented May 20, 2026

Why

This makes local development hot-reload across the frontend, REST API, and TAXII server so developers can verify changes faster while keeping the dev stack close to the production Compose shape used during normal deployment cycles.

What Changed

  • setup-workbench.sh now generates developer-mode Compose Watch overrides for all three services.
  • Compose Watch syncs source into named volumes mounted at the application source paths:
    • frontend src -> /workspace/src
    • REST API app and bin -> /usr/src/app/app and /usr/src/app/bin
    • generated REST config -> /usr/src/app/resources/rest-api-service-config.json
    • TAXII src -> /app/src
  • Dependency and build configuration changes trigger rebuilds instead of source syncs.
  • The generated override uses the dev image targets supplied by the service repos and leaves production-mode compose behavior separate.

How To Verify

From attack-workbench-deployment:

./docker/setup-workbench.sh --accept-defaults --dev-mode --taxii-server --instance-name live-reload-smoke
cd instances/live-reload-smoke
docker compose up --watch --build

Frontend live reload:

$EDITOR ../../../attack-workbench-frontend/src/app/views/landing-page/landing-page.component.html +12

Temporarily change Explore to Explore Live. Confirm the frontend updates in the browser after reload/HMR.

REST API live reload:

$EDITOR ../../../attack-workbench-rest-api/app/controllers/health-controller.js +7

Temporarily change the ping handler to return res.status(200).send('rest api watch works');, then run:

curl -i http://localhost:3000/api/health/ping

Confirm the changed response appears after Compose Watch syncs and the REST API watcher restarts the process.

TAXII live reload:

$EDITOR ../../../attack-workbench-taxii-server/src/taxii/controllers/root/root.controller.ts +21

Temporarily change the ping handler to use HttpStatus.OK and return a string, then run:

curl -i http://localhost:8000/health/ping

Confirm the changed response appears after Compose Watch syncs and Nest watch recompiles/restarts the service.

Also verified:

bash -n docker/setup-workbench.sh
docker compose config

Related PRs

Landing

Merge after the frontend, REST API, and TAXII live-reload PRs land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant