In the last section, we added in a ton of configuration to our Dr. Campos file to get our server up
and running, the server is now aware of a couple of different environment variables that it's going
to need to successfully connect to both rediscuss and Posterous.
We're not going to start to move forward the other two sections of configuration that we need to add
into this file our services for both the worker and the client projects.
So let's add both those in right now.
I'm going to go down to the bottom of the file and I'll add in a new service that will call client.
Now for the client service, we're going to end up with a couple of different properties that are just
about identical to the last Docker Campos file that we put together and even identical to the server
service.
So we just added a moment ago as well.
So for the client, we need to specify a build option for telling this thing what the context folder
is and where the Docker file is.
We also need to specify the relevant volumes as well to make sure that we don't have to constantly rebuild
the client image every time that we change some code inside there.
And then we're going to do the exact same two steps for the worker project as well.
So for build on the client, we're going to say your docker file is Docker file dev.
And the context is going to be the client directory, so inside the client directory is all the source
code relevant for the client service?
The context will be client like so.
Well, then set up the two volumes for the client, so let's say volumes, we're going again going to
say that we want to put that kind of bookmark hold on app Noad Module's.
So it's going to make sure that the node modules directory inside the container does not get overwritten
by any node modules folder that we might have inside the client.
And then we'll also set up the relationship between all of the source code inside the client directory
and the folder inside of the container.
So let's say everything inside the client directory should be shared with the app folder inside the
container.
All right, so now the last thing we need to do is set up the same service for our worker process as
well.
So we'll say we're going to have a worker service.
It will have a built with a docker file of docker file dot dev.
It will have a context of the worker directory.
And that's going to have volumes.
Of both app node modules and worker and everything inside that folder is going to be kind of mapped
over virtually to the app folder inside of the container.
All right, so that looks pretty good.
Now, we're just about done with the Dr. Campos file, but you might notice that there is one very disturbing
thing that we're currently missing inside the entire project.
We have not yet set up any port mapping whatsoever.
So there's no port mapping to expose the server to the outside world.
And there's no mapping for the Riak project as well as we had done on the previous REAC project that
we just put together.
Now, I want to direct you back to a diagram we were looking at just a moment ago, this one right here.
So we had said that with development we were going to have this Engine X server out here that was somehow
reacting to information or kind of like processing or routing requests from the browser to the react
server or the express server.
Let's take a quick pause right now.
We'll come back to the next section and we'll talk about the purpose of this little engine next thing
right here and what it's going to be doing for us.
So I'll see you in just a minute.