Commit 9584031
committed
fix(cli): build the code layer with an exclude copy instead of deleting node_modules
The code stage was a snapshot of the build stage that ran
`chmod -R u+rwX node_modules && rm -rf node_modules`; on overlayfs the chmod
copies every dependency file into the throwaway layer before the rm walks it
again, which made deploys of large projects markedly slower since 4.5.11.
The stage now copies /app from the build stage with node_modules excluded
(`COPY --exclude`, stable in the dockerfile:1 frontend the templates already
pin), producing the same dependency/code layer split with no extra walks.1 parent 04d3264 commit 9584031
3 files changed
Lines changed: 15 additions & 11 deletions
File tree
- .changeset
- packages/cli-v3/src/deploy
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
183 | | - | |
184 | | - | |
185 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | | - | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
194 | 195 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | | - | |
843 | | - | |
| 842 | + | |
844 | 843 | | |
845 | 844 | | |
846 | 845 | | |
| |||
945 | 944 | | |
946 | 945 | | |
947 | 946 | | |
948 | | - | |
| 947 | + | |
949 | 948 | | |
950 | | - | |
951 | | - | |
| 949 | + | |
952 | 950 | | |
953 | 951 | | |
954 | 952 | | |
| |||
0 commit comments