So that's it for this module.
We had a very detailed look at a more realistic application
consisting of three separate services,
removed every service,
the backend database, the backend API
and the front-end react single page application
into a standalone container.
And all these containers are able to talk to each other,
all these containers can persist their data if they need to,
and we also have live source code updates where needed.
You'll hopefully therefore have a better understanding
of how you could build applications like this,
potential pitfalls or problems you might be facing.
For example, we had some problems
with the react application and having it talk to node,
and you'll hopefully understand how Docker works,
what the idea behind containers is
and how you can combine multiple containers
into one application.
Definitely go through this module again
and through the tricky lectures if something is not clear.
Because it is really important that you have this foundation
about containers by now,
and that you do understand why we do certain things
and how they do work together here.
I also want to point out that
this module is about the development set up.
What we've set up here,
our Docker files and how we run these containers,
that all is aimed at development.
For example,
the backend and the front end application
reloading automatically when we change code,
that's something we absolutely want during development,
but that's not something we need or want
once this application is running on a production server,
serving this application to real users.
So this module was just about this development setup,
which is super important.
Setting up easy to use,
highly efficient development environments with Docker
is one of the key areas where Docker is being used.
There actually also are a lot of developers
who use Docker only in development
because they can encapsulate their environments and so on,
and they don't even use it for production.
Nonetheless, of course,
production setup and deployment
is also covered in this course in a separate module
because it will turn out that
deployment actually has its own challenges,
not directly related to Docker,
but resulting from the fact that we are using Docker.
But we'll talk about that in the deployment section.
I just wanted to emphasize and highlight it here already.
With all that said,
there also is some room for improvement here.
One major problem I have with
what we built in this module here
is that we have three pretty long Docker run commands,
which we have to run.
I mean, take a look.
Here's our front end application.
And we run this container with this Docker run command.
For MongoDB, it's this Docker run command,
and for the goal's backend, it's this command.
And we have to repeat this
every time we recreate a container,
we have to keep in mind that we need to add these volumes,
these anonymous volumes,
that we need to add an environment variable.
We have to keep all of that in mind.
We have to run the commands individually,
even though the containers kind of belong together,
we still have to run every command on its own.
And that is simply not necessarily
the developer experience we want.
It could be easy to run a command in the wrong way.
For example, by forgetting one volume
and suddenly something would not work,
and it might take us a couple of minutes
to find out why it's not working.
So it would be great if we wouldn't have to remember
and save those commands,
and if we wouldn't have to run them individually.
So if we could just run one command
and then all containers would be created in one go
with all the settings they need.
In addition, another area of improvement
is that it's a development only set up.
I talked about this a few seconds ago.
This is not optimized for production
and you shouldn't put the containers
as we have them right now onto a server.
Now I will talk about production later in a separate module,
I just want to emphasize it here.
In the next module,
we'll worry about the first problem though.
We'll make sure that we have an easier time running
and building complex multi container projects like this
on our local development machine.