Chapter 4: Composing Systems Using Containers
In the previous chapter, we created a server-side application using microservices architecture. The application was made up of five separate containers: three official images and two custom images. The official images were for MongoDB, Redis, and Mosca (MQTT).
For the most part, communication between containers is done via MQTT message passing. The subscriber container carries out the database Create, Read, Update, and Delete (CRUD) operations via the Node.js API for MongoDB and Redis. All of the relevant network ports are exposed on the development host, enabling the subscriber program to access the database servers at localhost
(127.0.0.1
) and both subscriber and publisher programs to access Mosca/MQTT at localhost
, too.
In this chapter, we are going to discuss composing systems—specifically, Docker Compose.  We are also going to learn how to keep network access private so that services can be accessed from within...