No, we are done with this final step in the Corizon Images gallery section.
And we added such services as more and more go express.
And we added to those containers more and Mongo Express to the existing Docker compose file.
And no, actually, let's go to source, control and commit those changes because we are done with Mongo
and Mongo Express configuration for Docker compose and commit mesoscale will be added Mongo and Mongo
Dash Express to the Docker desk compose like that.
Welcome the changes and quickly summarize.
Here we added Mongo service, and for this service we use official Docker.
Image available Addo-Carr.
This what this instruction tells for Docker.
We omitted that here and in this case, Docker utilize this latest deck.
We added a couple of environment variables here with scope of doors variables.
We set MongoDB username and password using such username and password.
We are now able to connect to MongoDB database.
Also, we added volume was meant for that.
We created custom volume called MongoDB data, and this volume was created here.
It was created actually inside of the Docker itself, and in such a way, we are able to persist MongoDB
data between different containers because each time when you run Docker compose up after running Docker
compose down brand new containers are created, including container from Mongo service.
Also, we added one more service called Mongo Express, and for it, we also utilize official image
Gold Mongo Dash Express.
This image contains actually Node.js application that uses Express Web server, and it is a convenient
way for all crud operations for Mongo because actual Mongo has only Mongo Shell.
This command line utility and using Mongo Express, we could work with Mongo much more conveniently.
We exposed your internal brought 88 to one to external support, +1 just for one go express and one
doesn't feel any exposed ports.
Also, there are few environment variables from one to express, such as MongoDB, etc. data set to
hostname or the Mongo server MongoDB admin username that is equal to this username, hero and admin
password that is equal to this password set for this Mongo container.
And also we edit instruction depends on Mongo, and that means that Mongo Express container is started
only after the start of the module container.
And also there are restart options both from ongoing Express and for Mongo.
That's how we edit Mongo to our project.
And please notice that we did not install Mongo on our computers.
Mongo is running all the inside of the container.
If I go to the terminal and open up New tab here and enter Mongo here, I'll get command not found Mongo
because Mongo is not installed directly on my computer.
It does run in all the inside of the container.
All right.
That's it for this summer lecture.
And next, let me explain to you how different containers communicate with each other, and you'll understand
that each container has actually its own IP address assigned by Docker.
Let's explore this after the break.