Compose as a Team Workflow

Why Teams Standardize on Compose

Environment-specific config comes from env files, not edits:

  api:
    image: orders-api:${TAG:-latest}
    env_file: .env
    environment:
      DB_HOST: db

Useful commands beyond up/down:

CommandDoes
docker compose up -d --buildrebuild images that changed, then up
docker compose restart webrestart one service
docker compose exec web shshell into a running service
docker compose configprint the fully-resolved file (great for debugging YAML)
docker compose pullupdate all images
Note: Compose is perfect up to "a handful of services on one host." The moment you need multi-host scheduling, self-healing and rolling deploys, that's Kubernetes - a different track, same mental models you're building here.
Goal: The Declare the Stack lab gives you the requirements doc; you write the compose file and bring up web + redis with volumes, ports and restart policies.