Docker Compose Watch: live updates while you code
Select an icon to see what it is.
Step 4 of 6
sync+restart: copy, then restart
nginx reads nginx.conf only at startup, so a copy alone would not take effect. With sync+restart, Compose copies the new file into the container and then sends POST /containers/{id}/restart. The container keeps its Id and IP, and the process starts again with the new config.
PUT /v1.45/containers/e7f8091a2b3c4d5ee7f8091a2b3c4d5ee7f8091a2b3c4d5ee7f8091a2b3c4d5e/archive?path=/etc/nginx (the call docker cp uses; Compose's exact API call is not documented)
body: a tar archive containing nginx.conf