
# A modern deployment strategy for a clusterified NodeJS apps using Docker.

The arrival of new exciting technologies such as NodeJS and Docker opens the door for very advanced clusterified deployments that
were almost, literally, rocket science just a few years ago. Still, being new technologies, the toolchains and ecosystems
have not had time to mature, an although very tempting, using these technologies can easily lead to frustration.

I decided to start this series of articles after having worked 5 years with node, and around 2 and a half with docker, in
the hope of helping others to avoid some of the pains that I have suffered myself, and hopefully introducing new rutines
and procedures that will make deployments organized and easier to perform.

These articles are about creating a customized automated deployment tool for deploying a microservice based
nodejs application across a cluster of node swarm nodes.

Disclaimer. This guide, although relevant for other docker scenarios, is heavily based on nodejs, and the tools and
scripts will all be written in nodejs as well. Furthermore, many of the tools used on the articles are actually developmed
by me, which introduced a natural bias, and I cannot guarantee there are other tools more suitable for the job. The articles
themselves are target from medium to advanced nodejs users.

Some of the topics that will be covered:

- Nodejs and docker swarm. A deployment machine.
- Why not docker-compose?. Building images in a differnt way.
- Handling secrets.
- Building a Microservice Architecture. Volumes, Networks and Services.
- Reverse proxies.
- Continous integration.
- Accessing isolated databases with your favorite tool (ssh tunneling).

