Lab 5.A - Orchestration
Image Source: DevopsCube
Filename: docker-compose.yml
services: # top level item
nginx: # name of service
image: nginx:alpine # image to use
container_name: nginx1 # name of container
mysql:
image: mysql:latest
container_name: mysql
docker compose up [-d]
docker compose down
docker compose start
docker compose run [service]
# docker-compose.yml
services:
webserver:
container_name: webserver
extends:
file: nginx.yml
service: nginx
# custom configuration here
# nginx.yml
services:
nginx:
image: nginx:alpine
# default configuration here