1
00:00:04,310 --> 00:00:07,390
Now, there was some use of data that we added to the MongoDB.

2
00:00:07,670 --> 00:00:13,010
We created the new database DMP, and we added new collection data called Paracels.

3
00:00:13,190 --> 00:00:16,370
And now there was a single document inside of this collection.

4
00:00:17,150 --> 00:00:24,230
Now let's try to restart all containers and see whether after a start, this data will be present here

5
00:00:24,230 --> 00:00:24,620
or not.

6
00:00:25,250 --> 00:00:26,390
Let's go to the terminal.

7
00:00:26,660 --> 00:00:31,160
Let's, first of all, Orion containers using Docker compose down command.

8
00:00:32,820 --> 00:00:38,580
It will stop all four containers, Mongo Express front and the Mongo and the EPA.

9
00:00:39,750 --> 00:00:40,560
This was done.

10
00:00:40,890 --> 00:00:43,410
No containers are being removed.

11
00:00:43,860 --> 00:00:44,850
They were removed.

12
00:00:45,360 --> 00:00:52,770
Notice that this step means complete removal of the containers and corresponding network that Doga created

13
00:00:52,920 --> 00:00:57,060
for communication between those four containers was removed as well.

14
00:00:57,450 --> 00:01:00,540
And now there are no containers, one I could enter.

15
00:01:00,540 --> 00:01:02,730
Docker be a command with option.

16
00:01:02,730 --> 00:01:06,390
This eight the stance for all and output is empty.

17
00:01:06,570 --> 00:01:12,060
There are no Niall Horan and no stopped containers recovered that before I removed.

18
00:01:12,060 --> 00:01:15,570
All previously started containers inside of the Docker desktop.

19
00:01:16,350 --> 00:01:19,410
Now let's go ahead and bring all containers up again.

20
00:01:19,440 --> 00:01:26,940
Docker compose up and let's at option deep detached and notice that this comment will now create brand

21
00:01:26,940 --> 00:01:34,380
new containers because at the moment there are no stop containers or containers were removed after Docker

22
00:01:34,380 --> 00:01:35,820
compose down command.

23
00:01:36,300 --> 00:01:38,400
Let's create brand new containers now.

24
00:01:40,090 --> 00:01:42,760
Great, and can you network because it was removed as well?

25
00:01:43,090 --> 00:01:44,290
Images gallery, the fold.

26
00:01:45,510 --> 00:01:51,480
Creating new containers for all services, Mongo API front and Mongo Express.

27
00:01:53,210 --> 00:01:59,840
All four containers away agree that let's verify that dog appeals, and here the you know, let's go

28
00:01:59,840 --> 00:02:05,900
back to Mongo Express to its graphical user interface and check whether Typekit database is present

29
00:02:05,900 --> 00:02:06,560
here or not.

30
00:02:06,860 --> 00:02:08,660
Let's simply refresh page here.

31
00:02:09,770 --> 00:02:13,190
And I see no DNA database here in this list.

32
00:02:13,760 --> 00:02:20,000
And this very reasonable list, no go to Docker compose file and there are I'll explain to you what

33
00:02:20,000 --> 00:02:25,250
actually happens right now and why we don't see any DMP database here anymore.

34
00:02:25,910 --> 00:02:30,440
Let's go here and recap that we added more on groceries like that.

35
00:02:31,160 --> 00:02:33,030
We simply specified image.

36
00:02:33,050 --> 00:02:37,280
It is more an official image and global of environment variables.

37
00:02:37,520 --> 00:02:38,210
That's it.

38
00:02:39,080 --> 00:02:47,180
And we just seen the Docker compose after bringing down all containers and bringing them up afterwards

39
00:02:47,750 --> 00:02:50,120
creates brand new containers.

40
00:02:50,640 --> 00:02:56,780
Here they are at this moment of time and all those containers that are created from scratch.

41
00:02:57,380 --> 00:03:01,760
Of course, new container IDs, new file systems, and so on.

42
00:03:02,120 --> 00:03:10,490
Everything is new and this way after Docker compose down and Docker compose up commands Mongo container.

43
00:03:10,790 --> 00:03:19,010
Here's actually initial contents of the Mongo image, and there was no custom use of data that we created

44
00:03:19,010 --> 00:03:26,420
before in the previous container because this container that we see right now is completely different

45
00:03:26,420 --> 00:03:32,090
from the container that was running before where we created DMB database.

46
00:03:32,870 --> 00:03:39,950
This very important to understand it means that now we are not persistent data in the Mongo database.

47
00:03:40,250 --> 00:03:46,610
And each time when you create new containers using Docker compose up after Docker compose down command,

48
00:03:47,120 --> 00:03:49,640
Mongo database will be created from scratch.

49
00:03:50,210 --> 00:03:53,720
But of course, if you want to process data, it's possible to achieve that.

50
00:03:54,170 --> 00:04:00,080
And for that, we could use custom volume that we will create inside of the Docker and map.

51
00:04:00,080 --> 00:04:05,090
This custom volume does a Mongo container, and let's do that after the small break.

