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 π
@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
@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!