Not every service in a compose file should start every time. A database admin page, a debug container or a seed job is noise on a normal run.
Give those services a profiles list. Services without one always start. Services with one stay off until you ask for them.
services:
app:
image: myapp
adminer:
image: adminer
profiles: [debug]
A plain docker compose up -d now starts only app. When I want the extra one, I run:
docker compose --profile debug up -d
You can repeat the flag, use --profile "*" for everything, or set COMPOSE_PROFILES=debug as an environment variable instead. One detail: if you name a profiled service directly, as in docker compose up adminer, it starts even though its profile is off.
You can also keep one compose file for several situations. Put a test runner, a backup job or a monitoring container behind their own profile names and pick what you need per run. That beats three copies drifting apart.
The caveat comes when you stop things. docker compose down only touches the profiles that are active, so run it with the same --profile flag or the extra container stays behind.
Further reading: Using profiles with Compose, On this site: ${VAR:?message} makes Compose stop when a variable is missing, On this site: use docker compose exec -T when a script runs it