You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/compose/how-tos/file-watch.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,8 +31,8 @@ Compose supports sharing a host directory inside service containers. Watch mode
31
31
More importantly, `watch` allows for greater granularity than is practical with a bind mount. Watch rules let you ignore specific files or entire directories within the watched tree.
32
32
33
33
For example, in a JavaScript project, ignoring the `node_modules/` directory has two benefits:
34
-
* Performance. File trees with many small files can cause high I/O load in some configurations
35
-
* Multi-platform. Compiled artifacts cannot be shared if the host OS or architecture is different to the container
34
+
* Performance. File trees with many small files can cause a high I/O load in some configurations
35
+
* Multi-platform. Compiled artifacts cannot be shared if the host OS or architecture is different from the container
36
36
37
37
For example, in a Node.js project, it's not recommended to sync the `node_modules/` directory. Even though JavaScript is interpreted, `npm` packages can contain native code that is not portable across platforms.
38
38
@@ -88,12 +88,12 @@ If `action` is set to `rebuild`, Compose automatically builds a new image with B
88
88
89
89
The behavior is the same as running `docker compose up --build <svc>`.
90
90
91
-
Rebuild is ideal for compiled languages or as fallbacks for modifications to particular files that require a full
91
+
Rebuild is ideal for compiled languages or as a fallback for modifications to particular files that require a full
92
92
image rebuild (e.g. `package.json`).
93
93
94
94
#### Sync + Restart
95
95
96
-
If `action` is set to `sync+restart`, Compose synchronizes your changes with the service containers and restarts it.
96
+
If `action` is set to `sync+restart`, Compose synchronizes your changes with the service containers and restarts them.
97
97
98
98
`sync+restart` is ideal when the config file changes, and you don't need to rebuild the image but just restart the main process of the service containers.
99
99
It will work well when you update a database configuration or your `nginx.conf` file, for example.
0 commit comments