Skip to content

Commit 5f06ff6

Browse files
committed
Remove git reset --hard command in web template to reduce layer size
I noticed that use running `git reset --hard` results in ~133MB being added to the final layer generated by `launcher bootstrap`. However, I can not figure out why we would need to run `git reset --hard` at all. Even if there is a reason to run `git reset --hard`, it should not be the default. If someone for whatever reason needs to run `git reset --hard`, they should do so using the `before_code` hook.
1 parent 033eaad commit 5f06ff6

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

templates/web.template.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ run:
9191
cd: $home
9292
hook: code
9393
cmd:
94-
- sudo -H -E -u discourse git reset --hard
9594
- sudo -H -E -u discourse git clean -f
9695
# TODO Remove the special handling of shallow clones when everyone uses images without that clone type
9796
- |-

0 commit comments

Comments
 (0)