Skip to content

Commit 072c526

Browse files
PERF: remove bundle cache on bundle install (#969)
Mirror the way we're cleaning bundle cache from base build: https://github.com/discourse/discourse_docker/blob/9ebce86fda3d9787d752de6311df15dcab9700f1/image/base/Dockerfile#L179-L180 This similarly removes the cache files in the web template.
1 parent 9ebce86 commit 072c526

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/web.template.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ run:
213213
cmd:
214214
- su discourse -c 'bundle install --jobs $(($(nproc) - 1)) --retry 3'
215215
- su discourse -c 'bundle clean'
216+
- su discourse -c 'find /var/www/discourse/vendor/bundle -name cache -not -path "*/gems/*" -type d -exec rm -rf {} +'
217+
- su discourse -c 'find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +'
216218

217219
- exec:
218220
cd: $home

0 commit comments

Comments
 (0)