docker-compose.override.yml — Devilbox 1.0 documentation
You can now run different PHP versions per project: Release v3.0.0-beta-0.1
The docker-compose.override.yml is the configuration file where you can override existing settings from docker-compose.yml or even add completely new services.
By default, this file does not exist and you must create it. You can either copy the existing docker-compose.override.yml-example or create a new one.
Table of Contents
Mục Lục
How does docker-compose.override.yml work?¶
When you run docker-compose up, it searches for a file named docker-compose.yml and reads
all configured services, networks, volumes etc to create your Docker stack. If you also
additionally have a file named docker-compose.override.yml this will be read as well and used
as an override file to complement. It works in the following order:
- All definitions from
will be useddocker-compose.yml
- All definitions that are also defined in
will automaticallydocker-compose.override.yml
overwrite the settings fromdocker-compose.yml
- All definitions only available in
will be added additionally.docker-compose.override.yml
For starting up your Docker Compose stack there are no additional steps or command line arguments
required. If both files exist, they will be read automatically.
See also
Docker Compose: Share Compose configurations between files and projects
Create docker-compose.override.yml¶
Copy example file¶
host>cd
path/to/devilbox host> cp docker-compose.override.yml-example docker-compose.override.yml
Create new file from scratch¶
- Create an empty file within the Devilbox git directory named
docker-compose.override.yml
- Retrieve the currently used version from the existing
filedocker-compose.yml
- Copy this version line to your newly created
at the very topdocker-compose.override.yml
# Create an empty file
host>cd
path/to/devilbox host> touch docker-compose.override.yml# Retrieve the current version
host> grep ^version docker-compose.yml version:'2.1'
# Add this version line to docker-compose.override.yml
host>echo
"version: '2.1'"
> docker-compose.override.yml
Let’s see again how this file should look like now:
docker-compose.override.yml
¶
version
:
'2.1'
Note
The documentation might be outdated and the version number might already be higher.
Rely on the output of the grep command.


















![Toni Kroos là ai? [ sự thật về tiểu sử đầy đủ Toni Kroos ]](https://evbn.org/wp-content/uploads/New-Project-6635-1671934592.jpg)


