Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application's services.
Suppopse that we have two services that we'd like to group together to build and deploy as a single unit. We decided to use Docker Compose to build the services together.
In this exercise, we create a Docker Compose YAML file, then use the Docker Compose utility to both build the Docker container images and run them.
Here is an example of a dockercompose.yml file.
After the dockercompose.yml file is ready, we run the follwing commands
- docker compose build : Builds the container images
- docker compose up : This starts both the frontend website and backend web API by running the containers

Comments
Post a Comment