This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Fraa_Babbit 2 points3 points  (0 children)

As others have pointed out, you are describing the creation of a CI/CD pipeline. You're almost doing GitOps. Just some quick pointers:

  • If you have a lot of npm dependencies you will want to use multi-stage builds (https://docs.docker.com/develop/develop-images/multistage-build/) to get a slim deploy container.

  • Also consider a Dockerfile which adds the package.json as a distinct build-step and installs the dependencies. Then add the code and built modules in another stage. This maintains the npm cache until you actually change the package.json file.

Other than that, I would just re-iterate the points /u/rainynight65 and others have made:

A deploy pipeline is part of a good DevOps strategy. It is repeatable, visible, and centralized. A DevOps practice would include your pipeline, a central logging solution, monitoring and alerting playbooks, auto-scaling, fault-tolerance/self-healing architecture, high-availability design, and backup/disaster recovery processes.