Closed marcinhlybin closed 3 months ago
I would be happy with such a feature indeed, thanks for opening this issue. PR welcome!
We can add a warning for the old argument compose_env_file
later on. Some old compose clients might rely on it.
Sorry if i yoinked your PR, but seeing there was no activity since you raised this issue @marcinhlybin, I took the liberty of making a PR for this one at #616 :)
The
docker-compose
command includes the--env-file
option, which accepts multiple files by allowing the option to be repeated. This is indicated in the command help asstringArray
, meaning it can take an array of strings, each representing a path to an environment file.To enhance functionality, a proposed update introduces the
compose_env_files
setting, which accepts aList[ValidPath]
. This addition enables specifying multiple environment files directly in the configuration and it uses the same naming convention as for other options.However, removing the existing
compose_env_file
setting would lead to breaking changes due to loss of backward compatibility.A more user-friendly approach might be to retain
compose_env_file
for compatibility while expanding its capabilities to accept either a single path or a list of paths. This dual support ensures backward compatibility and introduces the flexibility of specifying multiple environment files, either through the newcompose_env_files
setting or by extending the functionality of the existingcompose_env_file
option.