1
00:00:04,420 --> 00:00:08,690
No, we are done with this final step in the Corizon Images gallery section.

2
00:00:08,920 --> 00:00:12,580
And we added such services as more and more go express.

3
00:00:13,000 --> 00:00:18,590
And we added to those containers more and Mongo Express to the existing Docker compose file.

4
00:00:19,030 --> 00:00:24,250
And no, actually, let's go to source, control and commit those changes because we are done with Mongo

5
00:00:24,250 --> 00:00:31,180
and Mongo Express configuration for Docker compose and commit mesoscale will be added Mongo and Mongo

6
00:00:31,270 --> 00:00:35,860
Dash Express to the Docker desk compose like that.

7
00:00:36,550 --> 00:00:39,070
Welcome the changes and quickly summarize.

8
00:00:39,670 --> 00:00:44,530
Here we added Mongo service, and for this service we use official Docker.

9
00:00:44,530 --> 00:00:46,140
Image available Addo-Carr.

10
00:00:46,600 --> 00:00:49,090
This what this instruction tells for Docker.

11
00:00:49,720 --> 00:00:54,160
We omitted that here and in this case, Docker utilize this latest deck.

12
00:00:54,790 --> 00:00:58,990
We added a couple of environment variables here with scope of doors variables.

13
00:00:58,990 --> 00:01:04,599
We set MongoDB username and password using such username and password.

14
00:01:04,660 --> 00:01:07,990
We are now able to connect to MongoDB database.

15
00:01:08,770 --> 00:01:11,650
Also, we added volume was meant for that.

16
00:01:11,650 --> 00:01:17,890
We created custom volume called MongoDB data, and this volume was created here.

17
00:01:18,520 --> 00:01:24,790
It was created actually inside of the Docker itself, and in such a way, we are able to persist MongoDB

18
00:01:24,790 --> 00:01:32,080
data between different containers because each time when you run Docker compose up after running Docker

19
00:01:32,080 --> 00:01:38,140
compose down brand new containers are created, including container from Mongo service.

20
00:01:39,100 --> 00:01:46,600
Also, we added one more service called Mongo Express, and for it, we also utilize official image

21
00:01:46,600 --> 00:01:48,250
Gold Mongo Dash Express.

22
00:01:48,880 --> 00:01:55,180
This image contains actually Node.js application that uses Express Web server, and it is a convenient

23
00:01:55,180 --> 00:02:00,810
way for all crud operations for Mongo because actual Mongo has only Mongo Shell.

24
00:02:00,910 --> 00:02:06,520
This command line utility and using Mongo Express, we could work with Mongo much more conveniently.

25
00:02:12,520 --> 00:02:20,590
We exposed your internal brought 88 to one to external support, +1 just for one go express and one

26
00:02:20,830 --> 00:02:22,900
doesn't feel any exposed ports.

27
00:02:23,530 --> 00:02:29,530
Also, there are few environment variables from one to express, such as MongoDB, etc. data set to

28
00:02:29,530 --> 00:02:37,120
hostname or the Mongo server MongoDB admin username that is equal to this username, hero and admin

29
00:02:37,120 --> 00:02:42,250
password that is equal to this password set for this Mongo container.

30
00:02:42,760 --> 00:02:49,270
And also we edit instruction depends on Mongo, and that means that Mongo Express container is started

31
00:02:49,270 --> 00:02:52,240
only after the start of the module container.

32
00:02:52,840 --> 00:02:57,700
And also there are restart options both from ongoing Express and for Mongo.

33
00:02:58,540 --> 00:03:00,820
That's how we edit Mongo to our project.

34
00:03:01,240 --> 00:03:05,230
And please notice that we did not install Mongo on our computers.

35
00:03:05,680 --> 00:03:08,650
Mongo is running all the inside of the container.

36
00:03:09,130 --> 00:03:17,020
If I go to the terminal and open up New tab here and enter Mongo here, I'll get command not found Mongo

37
00:03:17,260 --> 00:03:20,860
because Mongo is not installed directly on my computer.

38
00:03:21,160 --> 00:03:23,620
It does run in all the inside of the container.

39
00:03:24,760 --> 00:03:25,240
All right.

40
00:03:25,390 --> 00:03:27,070
That's it for this summer lecture.

41
00:03:27,070 --> 00:03:33,790
And next, let me explain to you how different containers communicate with each other, and you'll understand

42
00:03:33,790 --> 00:03:38,380
that each container has actually its own IP address assigned by Docker.

43
00:03:38,860 --> 00:03:40,480
Let's explore this after the break.

