Compose override file
A second Compose file whose settings are merged on top of the main one, typically for development.
In more detail
docker compose automatically merges compose.override.yaml if it exists, or you name files explicitly with -f. Use it to add bind mounts for hot reloading, a debugger port or verbose logging in development, while the main file stays close to production.
Related terms
- Compose file — The YAML file, usually compose.yaml, that lists the services, networks and volumes of an application.
- hot reloading — Having a running program pick up code changes automatically, without rebuilding or restarting by hand.
- debugger — A tool that pauses a running program so you can step through it line by line and inspect its variables.
- bind mount — Mounting a folder from the host directly into a container, so both see the same files.
Taught in
- Build Context, Dockerignore And Your First Dockerfile — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- CMD, ENTRYPOINT, USER And Process Signals — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Health Checks, Dependencies And Reliable Startup — Docker Architecture & Production Containers
- Development Overrides, Hot Reloading And Debuggers — Docker Architecture & Production Containers