Skip to content

Commit 2fb389f

Browse files
authored
Run npmp prune and bundle clean to clean up unused files (#902)
pnpm packages and bundle gems can add significant size to the Docker image. Ensure that we clean up those unused files to ensure we don't add extra diskspace to the final layer when bootstrapping.
1 parent 033eaad commit 2fb389f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/web.template.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,15 @@ run:
188188
fi
189189
su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
190190
else
191-
su discourse -c 'CI=1 pnpm install --frozen-lockfile'
191+
su discourse -c 'CI=1 pnpm install --frozen-lockfile && pnpm prune'
192192
fi
193193
194194
- exec:
195195
cd: $home
196196
hook: bundle_exec
197197
cmd:
198198
- su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
199+
- su discourse -c 'bundle clean'
199200

200201
- exec:
201202
cd: $home

0 commit comments

Comments
 (0)