Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I got measurable decreases in deployment time by shrinking the node_modules directory in our docker images.

I think people forget that, when you’re copying the same images to dozens and dozens of boxes, any improvement starts to add up to real numbers.



I've not done it, but have you considered using `pnpm` and volume-mounting a shared persistent `pnpm-store` into the containers? It seems like you'd get near-instant npm installs that way.


The only time npm install was on the critical path was hotfixes. It’s definitely worth considering. But I was already deep into doing people giant favors that they didn’t even notice, so I was juggling many other goals. I think the only thank you I got was from the UI lead, who had some soda straw internet connection and this and another thing I did saved him a bunch of hard to recover timeouts.


In this approach the size of deployment bundles / images is not necessarily reduced.

Reduced is the size of javascript loaded into the end user's browser.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: