1 00:00:01,180 --> 00:00:05,320 We've got some doctor file and a doctor ignore wired up to our post service. 2 00:00:05,320 --> 00:00:09,970 We now need to make sure that we can dock writes all of our other services as well because all these 3 00:00:10,000 --> 00:00:12,850 other services are just about identical in nature to posts. 4 00:00:12,880 --> 00:00:16,870 In other words they use node and they all have the same start up command of NPM start. 5 00:00:16,870 --> 00:00:20,920 We can really just use the exact same doctor ignore in Docker file with all the other ones. 6 00:00:21,030 --> 00:00:25,150 So really just going to take those two files and copy paste them all around. 7 00:00:25,180 --> 00:00:27,340 This is true even of the react project. 8 00:00:27,390 --> 00:00:34,040 The HREOC project uses node as a base environment and also get started with NPM start as well. 9 00:00:34,300 --> 00:00:36,550 So let's get to it inside my post directory. 10 00:00:36,550 --> 00:00:39,490 I'll find the doc or ignore in Docker files. 11 00:00:39,710 --> 00:00:48,180 I'm going to highlight both them copy them and I will paste them into query I will paste them into moderation 12 00:00:50,170 --> 00:01:01,160 I'll paste them into event plus into comments and finally into client so naturally. 13 00:01:01,260 --> 00:01:06,900 If we had all these services being created using different languages or even some kind of subtle different 14 00:01:06,900 --> 00:01:11,190 environment or something like that like let's say a different version of node or maybe these start up 15 00:01:11,190 --> 00:01:11,910 command was different. 16 00:01:11,910 --> 00:01:17,130 Who knows then we would want to customize the docker file for every service but because we were designing 17 00:01:17,130 --> 00:01:20,520 this project ahead of time and we had a pretty good idea of what was going to happen at some point in 18 00:01:20,520 --> 00:01:25,890 the future I said hey let's just go ahead and make these Docker files or write each these projects so 19 00:01:25,890 --> 00:01:30,720 we can have identical Docker files for each one but again for a neural project you would probably end 20 00:01:30,720 --> 00:01:33,180 up doing some kind of customization. 21 00:01:33,250 --> 00:01:33,740 All right. 22 00:01:33,740 --> 00:01:36,050 So just to make sure that everything works correctly. 23 00:01:36,050 --> 00:01:40,010 Let's just pick one these services at random and make sure that we can build an image out of it. 24 00:01:40,010 --> 00:01:41,730 So how about How about the event bus. 25 00:01:41,810 --> 00:01:42,500 Let's try that out. 26 00:01:44,170 --> 00:01:48,110 Back at my terminal I going to change into the event bus directory. 27 00:01:48,220 --> 00:01:49,840 And let's just go ahead and try to build an image. 28 00:01:49,840 --> 00:01:51,430 I don't really expect to see in the air. 29 00:01:51,430 --> 00:01:54,180 We're just doing this to make sure nothing's going to go wrong. 30 00:01:54,270 --> 00:01:58,810 So inside the event bus directory I'll do a docker build dot. 31 00:01:58,900 --> 00:02:06,070 And of course if we wanted to we could also tag this like so if we wanted to. 32 00:02:06,260 --> 00:02:08,170 Go ahead run that command. 33 00:02:08,170 --> 00:02:09,460 We're gonna go through the same steps. 34 00:02:09,490 --> 00:02:12,970 So we start off with node as our base image set up the working directory. 35 00:02:12,970 --> 00:02:15,910 Copy over Pakistan based on install dependencies. 36 00:02:15,910 --> 00:02:20,240 Copy over all the other source code from our project and then set up the default command. 37 00:02:20,370 --> 00:02:24,400 And now we can take either the image I.D. or just the tag right here. 38 00:02:27,380 --> 00:02:34,080 And do a docker run and then put in the image I.D. or the tag and there we go. 39 00:02:34,160 --> 00:02:34,450 All right. 40 00:02:34,460 --> 00:02:35,650 So we've now Doc arised. 41 00:02:35,660 --> 00:02:40,550 More or less we have actually created images out of all these other services but we certainly have the 42 00:02:40,550 --> 00:02:41,790 means to do so. 43 00:02:41,810 --> 00:02:45,050 So we've now more or less Dr. Rice our entire project. 44 00:02:45,050 --> 00:02:49,940 Which means we're now going to take a pause making next video and start to discuss Coober nettles. 45 00:02:50,060 --> 00:02:53,870 We're gonna start to see how we can use Cuban eddies beyond what we just discussed about how it works 46 00:02:53,870 --> 00:02:59,210 over here a little bit ago to run all these different containers and get all these containers communicating 47 00:02:59,210 --> 00:03:00,470 together very easily.