Choose between `docker compose watch`, bind mounts and rebuilds for developer inner loop.
IntermediateScenarioCI/CD and production rollouts
Answer
Situation read → Fast feedback matters.
What I'd do → develop.watch with sync for interpreted code, sync+restart for config changes, rebuild for dependency manifest changes:
develop:
watch:
- { action: sync, path: ./src, target: /app/src }
- { action: rebuild, path: package.json }
Why → Avoids bind-mount perf and ownership problems while keeping speed.
Interview tip → Run with docker compose up --watch.
More on CI/CD and production rollouts
Design a GitHub Actions workflow that builds, scans and pushes an image.IntermediateZero-downtime deploy on a single Docker host.AdvancedDeploy via GitOps with image digests.IntermediateCanary a new image on a Swarm service.AdvancedDocker build is flaky in CI due to network errors on package installs.IntermediateRun database migrations in the deploy flow of containerized apps.Intermediate