Deploying a PHP application: 10 seconds.
Deploying a JS application: 120 seconds.
Do people who have experience with modern JS notice a similar trend, or is it only my project?

@afilina yep, it's not fast by default. There are ways to improve that though.

Things to check for:
- verify it's only installing prod dependencies and no dev dependencies
- use a lockfile and have a cache that will restore deps if the lockfile hasn't changed instead of downloading again

Hope that helps πŸ‘

@nicoespeon Do people normally build push containers *with* the giant deps folder, or do they push containers that then install deps on premise? I'm asking because after it took a long time to pull deps, it took additional time to push container and pull it on the other side. It felt like too many transfers for such a big deps folder.

@afilina in general the code is pushed on the container *without* the deps folder. Then it install deps (or fetch from some cache).

Typically, node_modules/ isn't versioned with the code

@nicoespeon This is not about pushing code. This is about pushing docker containers as a deployment mechanism.

@afilina oh sorry, I misunderstood your point.

I'm not 100% sure as I haven't done that recently. But here is a recent post from a relevant actor (Snyk) that details best practices for deploying Node.js apps with Docker: https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker/

Maybe that will help!

10 best practices to containerize Node.js web applications with Docker | Snyk Blog | Snyk

Are you looking for best practices on how to build Node.js Docker images for your web applications? Then you’ve come to the right place!

Snyk