Skip to content

feat(infra): Docker Compose dev environment auto-reload file watcher (Closes #1366) - #1415

Closed
camesenin wants to merge 1 commit into
FinesseStudioLab:mainfrom
camesenin:feat/compose-watch-1366
Closed

camesenin wants to merge 1 commit into
FinesseStudioLab:mainfrom
camesenin:feat/compose-watch-1366

Conversation

@camesenin

Copy link
Copy Markdown

Summary

Resolves #1366

Configures native Docker Compose file watching (develop.watch) across the repository, enabling real-time file synchronization and Hot Module Replacement (HMR) in local containerized development environments without requiring container restarts or manual rebuilds.

Changes

  1. compose.yaml:
    • Configured develop.watch on backend with sync action on ./backend/src -> /app/backend/src and rebuild on ./backend/package.json.
    • Configured develop.watch on frontend with sync action on ./frontend/src -> /app/frontend/src and ./frontend/public -> /app/frontend/public, and rebuild on ./frontend/package.json.
    • Set CHOKIDAR_USEPOLLING: "true" on the frontend service.
  2. frontend/vite.config.js:
    • Added watch: { usePolling: process.env.CHOKIDAR_USEPOLLING === 'true' } to server block to support reliable file events across Windows/WSL2 and macOS mounts.
  3. Makefile & package.json:
    • Added dev-watch target in Makefile (docker compose watch).
    • Added "dev:watch": "docker compose watch" in root package.json.
  4. Documentation:
  5. Testing:

Verification

  • Ran node --test tests/composeWatch.test.js passing 4/4 tests cleanly.
  • Verified Prettier code formatting on all modified files (npx prettier --check).

@camesenin

Copy link
Copy Markdown
Author

Hi @Gbangbolaoluwagbemiga @joelpeace48-cell, this PR is ready for review with all tests passing. Could you please assign me to this issue on Drips Wave (@camesenin) so that it is properly tracked for Wave 9 before merging? Thank you!

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.

feat(infra): Docker Compose dev environment auto-reload file watcher

2 participants