Open nicofrand opened 1 year ago
FYI: removing the yarn cache and clearing the dev dependencies are two different things, which are not linked, and can be done separately.
Info: Backing up the database...
Info: Backup script completed for umami. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files...
Info: The archive will contain about 3.3GB of data.
☠️
You can give it a spin by running sudo yunohost app upgrade umami -u https://github.com/orhtej2/umami_ynh/tree/slim_prod
after making proper backup, just in case.
I'll keep it as draft to get some results in.
Worked like a charm. Directory now takes ~1.2G (node_modules still taking 1.1G). Thanks!
Worked like a charm. Directory now takes ~1.2G (node_modules still taking 1.1G). Thanks!
node_modules
actually seem necessary, what's present in slimed down version is a subset as per https://github.com/umami-software/umami/blob/master/Dockerfile
Also-also please don't upgrade from master
, stuff will likely break. I'll keep the slim_prod
aligned with testing
for the time being.
Worked like a charm. Directory now takes ~1.2G (node_modules still taking 1.1G). Thanks!
node_modules
actually seem necessary, what's present in slimed down version is a subset as per https://github.com/umami-software/umami/blob/master/Dockerfile
Yes of course. Still, a few MB were earned on that directory :)
Describe the bug
Not a bug per se but the installation takes quite a lot of space: 2.4G:
node_modules
takes already 800M..cache/yarn
takes 1.4GI have a really limited disk space on my VPS and this is quite a lot.
During the installation all the dependencies (dev & prod) are installed, to be able to build the app (
yarn build
) and then run it.Removing dev dependencies once the build step is finished would avoid some unused assets.
I believe this would be possible by adding the steps below in https://github.com/YunoHost-Apps/umami_ynh/blob/master/scripts/install#L132-L136:
rm .cache/yarn/* -rf
rm node_modules -rf
yarn install --production
This basically removes the dependencies and reinstall the project in production.
Context