1
00:00:02,430 --> 00:00:04,780
So that's it for this module.

2
00:00:04,780 --> 00:00:09,040
We had a very detailed look at a more realistic application

3
00:00:09,040 --> 00:00:12,090
consisting of three separate services,

4
00:00:12,090 --> 00:00:14,010
removed every service,

5
00:00:14,010 --> 00:00:16,730
the backend database, the backend API

6
00:00:16,730 --> 00:00:19,530
and the front-end react single page application

7
00:00:19,530 --> 00:00:21,560
into a standalone container.

8
00:00:21,560 --> 00:00:24,490
And all these containers are able to talk to each other,

9
00:00:24,490 --> 00:00:28,470
all these containers can persist their data if they need to,

10
00:00:28,470 --> 00:00:31,703
and we also have live source code updates where needed.

11
00:00:32,810 --> 00:00:35,440
You'll hopefully therefore have a better understanding

12
00:00:35,440 --> 00:00:38,310
of how you could build applications like this,

13
00:00:38,310 --> 00:00:42,200
potential pitfalls or problems you might be facing.

14
00:00:42,200 --> 00:00:44,020
For example, we had some problems

15
00:00:44,020 --> 00:00:47,930
with the react application and having it talk to node,

16
00:00:47,930 --> 00:00:51,350
and you'll hopefully understand how Docker works,

17
00:00:51,350 --> 00:00:53,260
what the idea behind containers is

18
00:00:53,260 --> 00:00:56,330
and how you can combine multiple containers

19
00:00:56,330 --> 00:00:57,743
into one application.

20
00:00:58,670 --> 00:01:01,270
Definitely go through this module again

21
00:01:01,270 --> 00:01:05,060
and through the tricky lectures if something is not clear.

22
00:01:05,060 --> 00:01:08,980
Because it is really important that you have this foundation

23
00:01:08,980 --> 00:01:10,400
about containers by now,

24
00:01:10,400 --> 00:01:14,040
and that you do understand why we do certain things

25
00:01:14,040 --> 00:01:16,173
and how they do work together here.

26
00:01:17,050 --> 00:01:19,200
I also want to point out that

27
00:01:19,200 --> 00:01:23,400
this module is about the development set up.

28
00:01:23,400 --> 00:01:25,250
What we've set up here,

29
00:01:25,250 --> 00:01:28,600
our Docker files and how we run these containers,

30
00:01:28,600 --> 00:01:31,720
that all is aimed at development.

31
00:01:31,720 --> 00:01:32,553
For example,

32
00:01:32,553 --> 00:01:34,700
the backend and the front end application

33
00:01:34,700 --> 00:01:37,660
reloading automatically when we change code,

34
00:01:37,660 --> 00:01:41,430
that's something we absolutely want during development,

35
00:01:41,430 --> 00:01:44,120
but that's not something we need or want

36
00:01:44,120 --> 00:01:47,440
once this application is running on a production server,

37
00:01:47,440 --> 00:01:50,023
serving this application to real users.

38
00:01:50,880 --> 00:01:54,530
So this module was just about this development setup,

39
00:01:54,530 --> 00:01:56,200
which is super important.

40
00:01:56,200 --> 00:01:58,330
Setting up easy to use,

41
00:01:58,330 --> 00:02:01,420
highly efficient development environments with Docker

42
00:02:01,420 --> 00:02:04,960
is one of the key areas where Docker is being used.

43
00:02:04,960 --> 00:02:07,730
There actually also are a lot of developers

44
00:02:07,730 --> 00:02:10,199
who use Docker only in development

45
00:02:10,199 --> 00:02:14,200
because they can encapsulate their environments and so on,

46
00:02:14,200 --> 00:02:16,760
and they don't even use it for production.

47
00:02:16,760 --> 00:02:17,850
Nonetheless, of course,

48
00:02:17,850 --> 00:02:20,410
production setup and deployment

49
00:02:20,410 --> 00:02:24,170
is also covered in this course in a separate module

50
00:02:24,170 --> 00:02:25,740
because it will turn out that

51
00:02:25,740 --> 00:02:28,840
deployment actually has its own challenges,

52
00:02:28,840 --> 00:02:31,480
not directly related to Docker,

53
00:02:31,480 --> 00:02:35,360
but resulting from the fact that we are using Docker.

54
00:02:35,360 --> 00:02:38,000
But we'll talk about that in the deployment section.

55
00:02:38,000 --> 00:02:41,123
I just wanted to emphasize and highlight it here already.

56
00:02:42,190 --> 00:02:43,860
With all that said,

57
00:02:43,860 --> 00:02:47,020
there also is some room for improvement here.

58
00:02:47,020 --> 00:02:49,605
One major problem I have with

59
00:02:49,605 --> 00:02:52,560
what we built in this module here

60
00:02:52,560 --> 00:02:56,610
is that we have three pretty long Docker run commands,

61
00:02:56,610 --> 00:02:58,140
which we have to run.

62
00:02:58,140 --> 00:02:59,860
I mean, take a look.

63
00:02:59,860 --> 00:03:02,040
Here's our front end application.

64
00:03:02,040 --> 00:03:05,633
And we run this container with this Docker run command.

65
00:03:06,720 --> 00:03:09,663
For MongoDB, it's this Docker run command,

66
00:03:11,000 --> 00:03:13,703
and for the goal's backend, it's this command.

67
00:03:14,780 --> 00:03:16,730
And we have to repeat this

68
00:03:16,730 --> 00:03:19,480
every time we recreate a container,

69
00:03:19,480 --> 00:03:23,200
we have to keep in mind that we need to add these volumes,

70
00:03:23,200 --> 00:03:24,620
these anonymous volumes,

71
00:03:24,620 --> 00:03:26,820
that we need to add an environment variable.

72
00:03:26,820 --> 00:03:28,720
We have to keep all of that in mind.

73
00:03:28,720 --> 00:03:31,550
We have to run the commands individually,

74
00:03:31,550 --> 00:03:34,040
even though the containers kind of belong together,

75
00:03:34,040 --> 00:03:36,360
we still have to run every command on its own.

76
00:03:36,360 --> 00:03:38,950
And that is simply not necessarily

77
00:03:38,950 --> 00:03:41,630
the developer experience we want.

78
00:03:41,630 --> 00:03:44,600
It could be easy to run a command in the wrong way.

79
00:03:44,600 --> 00:03:46,990
For example, by forgetting one volume

80
00:03:46,990 --> 00:03:49,350
and suddenly something would not work,

81
00:03:49,350 --> 00:03:51,120
and it might take us a couple of minutes

82
00:03:51,120 --> 00:03:53,600
to find out why it's not working.

83
00:03:53,600 --> 00:03:55,860
So it would be great if we wouldn't have to remember

84
00:03:55,860 --> 00:03:57,680
and save those commands,

85
00:03:57,680 --> 00:03:59,870
and if we wouldn't have to run them individually.

86
00:03:59,870 --> 00:04:02,000
So if we could just run one command

87
00:04:02,000 --> 00:04:05,360
and then all containers would be created in one go

88
00:04:05,360 --> 00:04:07,710
with all the settings they need.

89
00:04:07,710 --> 00:04:10,580
In addition, another area of improvement

90
00:04:10,580 --> 00:04:12,910
is that it's a development only set up.

91
00:04:12,910 --> 00:04:15,070
I talked about this a few seconds ago.

92
00:04:15,070 --> 00:04:17,320
This is not optimized for production

93
00:04:17,320 --> 00:04:19,010
and you shouldn't put the containers

94
00:04:19,010 --> 00:04:21,950
as we have them right now onto a server.

95
00:04:21,950 --> 00:04:26,040
Now I will talk about production later in a separate module,

96
00:04:26,040 --> 00:04:28,510
I just want to emphasize it here.

97
00:04:28,510 --> 00:04:29,870
In the next module,

98
00:04:29,870 --> 00:04:32,150
we'll worry about the first problem though.

99
00:04:32,150 --> 00:04:35,510
We'll make sure that we have an easier time running

100
00:04:35,510 --> 00:04:38,717
and building complex multi container projects like this

101
00:04:38,717 --> 00:04:41,373
on our local development machine.

