Docker Compose introduces the concept of multi-container applications using an all-in-one application components' definition file. This file is known as docker-compose.yaml. Usually, we will manage a docker-compose.yaml file. Notice that this is a YAML file; therefore, indentation is fundamental. The file will contain all of the application components and their properties.
This is how a simple docker-compose.yaml file looks (we can use either the .yaml or .yml extension for YAML files):
version: "3.7"
services:
lb:
build: simplestlb
image: myregistry/simplest-lab:simplestlb
environment:
- APPLICATION_ALIAS=simplestapp
- APPLICATION_PORT=3000
networks:
simplestlab:
aliases:
- simplestlb
ports:
- "8080:80"
db:
build: simplestdb
image: myregistry/simplest-lab:simplestdb
environment:
- "POSTGRES_PASSWORD=changeme"
networks:
simplestlab...