Docker Compose Watch: live updates while you code
Select an icon to see what it is.
Step 1 of 6
Rules in the file say what to do
Under a service, develop.watch lists rules, each with a path on the host and an action. sync copies changed files into the container, sync+restart copies them and restarts the container, and rebuild builds the image again and recreates the container. Rules can also use ignore patterns.
PrevNext
compose.yaml (excerpt)
develop:watch:- action: syncpath: ./htmltarget: /usr/share/nginx/html- action: sync+restartpath: ./nginx.conftarget: /etc/nginx/nginx.conf- action: rebuildpath: ./Dockerfile