In the last section we added a ton of configuration to our dock or compose 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 redness and postscripts.
We're now going to start to move forward.
The other two sections of configuration that we need to add into this file are 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 we'll call client
for the client service.
We're going to end up with a couple of different properties that are just about identical to the last
doc or compose file that we put together and even identical to the server service that we just added
a moment ago as well.
So for the client we need to specify a build option or 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 doc 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 flash client like so
then set up the two volumes for the client.
So say volumes we're going again going to say that we want to put that kind of bookmark holt on app
node modules.
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 app folder inside of the container.
So say everything inside the client directory should be shared with the app folder inside the container.
All right so now 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 doc or file dev.
It will have a context of the worker directory and it's going to have volumes of both app node modules
and slash worker and everything inside that folder is going to be kind of mapped over virtually to the
app folder inside of a container.
All right.
That looks pretty good.
Now we're just about done with the docker compose file but you might notice that there is one very distinct
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 have 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 proxying or routing requests from the browser to the reac server
or the Express server.
Let's take a quick pause right now.
We'll come back 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 we'll see you in just a minute.