We already agreed to local files for front end and FBI applications, and now it's time to create Docker
compose file with instructions to start both front end and API containers.
Let's get started with that.
Now there are two containers front end and API Iran, and I could verify that using Docker Peoples Command.
And now I'll stop both containers, and afterwards we will create Docker, compose, file and run them
using Docker Compose feature.
So let's stop with container Docker stop.
And here will be the name of the container.
This one like that stopping.
And let's also stop second container with such name in your case, names will be completely different
from mine.
Second container was stopped and now there are no containers running.
And now let's go to our project and here in the root of the Images Gallery folder and show that you'll
do that in the root of the Images Gallery folder, please create new file golden girl.
This compose note why and well, why AML stands for Yamal and of the extension for Docker compose file.
Notice that the voice gold recognized the type of this file does Boker file and again ensure that the
name of this file is exactly like that Docker disk compose dot.
Why AML?
This file is located in the root of our project, because here we will specify all the sewing instructions
to start both API and front and services.
Let's add instructions here.
There are different versions of Docker compose and using version keyword.
We need to set specific version that we want to use, and we will use third version of the Docker compose
on the next line.
Let's add services that we want to run using Docker compose, and at the moment we want to run two services
API and front end.
Please add, So is this keyword notice that we could suggest you specific years for Docker compose file?
That's because we installed Docker extension, so services here at Scholem and after gold.
Please move to the next line and breast step here.
Ensure that Deb expressed here.
We will add first service and it is front, end, front.
And of course, here you don't see any suggestions to autocomplete name because the actual name for
the service you choose it here will be colon.
Let's go to the next line and press step once again.
And here we need to add instructions for Docker compose.
How to start our front end application and first instruction is built using this instruction.
We need to tell Docker where to find necessary Docker file for corresponding custom image because Docker
Compose needs to know how to build custom images for front end and the API service will use for the
build.
Key needs to be path to the folder where Docker file is located.
And here we describe front end service.
This way path here will be a dot less front end like that.
It is our front and folder here because inside of this folder, there was corresponding Docker file
that we created before.
All right.
Built construction was added next, let's add both my opinion using force construction type ports column.
Go to the next line.
Here are pressed tap miners and Hero Type three thousand goal three thousand instructions here will
be similar to those that we used in this public option when we run our front end service.
Separately, Internal Container Port three thousand will be mapped to port three thousand on your local
machine, so that both instruction.
That's it for front end service for now.
And now let's add one more service and show that you move to the same level where front and key is located.
And here are type API.
API service needs to be built using Docker file located in the API folder.
This way, build keyboard will have, well, your daughter less API.
That is EPA folder here, and there was corresponding Docker file inside.
Also, let's add here both my opinion, Paul's column on the next line, Deb Minus, and here let's
explore Sport 50-50.
Will the same brought on your local computer like that?
This actually, for the first version of the Docker compose file, let's say changes in this file and
because of the small balls, let's try to run both containers front end and API using Docker Compose
Command.
I'll see you guys next.