Glossary

Docker Compose

Docker Compose is a tool for running multi-container applications via a single YAML file (compose.yaml). One command brings up the entire stack: application, database, Redis, queue — each in its own container with the correct connections.

Basic structure

services:
  app:
    build: .
    ports: ["8080:80"]
    depends_on: [db, redis]
    environment:
      DB_HOST: db

  db:
    image: mysql:8.4
    volumes: [db-data:/var/lib/mysql]
    environment:
      MYSQL_ROOT_PASSWORD: secret

  redis:
    image: redis:alpine

volumes:
  db-data:

Key commands