File tree 1 file changed +19
-0
lines changed
content/reference/compose-file
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,25 @@ The syntax is the same as `.dockerignore` file:
102
102
If the build context includes a `.dockerignore` file, the patterns in this file is loaded as implicit content
103
103
for the `ignores` file, and values set in the Compose model are appended.
104
104
105
+ # ### `include`
106
+
107
+ It is sometimes easier to select files to be watched instead of declaring those that shouldn't be watched with `ignore`.
108
+
109
+ The `include` attribute can be used to define a pattern, or a list of patterns, for paths to be considered for watching.
110
+ Only files that match these patterns will be considered when applying a watch rule. The syntax is the same as `ignore`.
111
+
112
+ ` ` ` yaml
113
+ services:
114
+ backend:
115
+ image: example/backend
116
+ develop:
117
+ watch:
118
+ # rebuild image and recreate service
119
+ - path: ./src
120
+ include: *.go
121
+ action: rebuild
122
+ ` ` `
123
+
105
124
# ### `path`
106
125
107
126
` path` attribute defines the path to source code (relative to the project directory) to monitor for changes. Updates to any file
You can’t perform that action at this time.
0 commit comments