What is Compose `develop.watch`?
IntermediateConceptVolumes & Bind Mounts
Answer
A dev feature (docker compose watch) with actions sync, rebuild and sync+restart that reacts to file changes without bind mounting the whole tree.
services:
web:
build: .
develop:
watch:
- action: sync
path: ./src
target: /app/src
- action: rebuild
path: package.json
More on Volumes & Bind Mounts
What are the three ways to persist or share data with a container?BeginnerVolume vs bind mount: when do you pick which?BeginnerWhat is the difference between `-v` and `--mount`?BeginnerWhat is an anonymous volume and how do you find leftovers?IntermediateHow does a new named volume get populated?IntermediateHow do you back up and restore a named volume?Intermediate