Hi everyone,
I’m trying to reduce disk space usage on a production Frappe server.
Currently, all apps in the apps directory were cloned normally and contain the full Git history. I noticed that the .git directories consume a significant amount of disk space.
For example, if I have the frappe app under apps/frappe, can I do the following safely on a production server?
-
Stop the bench.
-
Remove the existing app directory:
rm -rf apps/frappe -
Clone it again using a shallow clone:
git clone --depth 1 <frappe-repo-url> apps/frappe -
Run
bench setup requirements(if needed) and start the bench again.
Will this cause any issues with:
-
Existing sites and databases?
-
Future
bench updateoperations? -
App version detection?
-
Patches or migrations?
Has anyone done this successfully in production, or is there a recommended way to reduce Git history size for Frappe apps?
Thanks!