Skip to main content

parse_file_with_env_files

Function parse_file_with_env_files 

Source
pub fn parse_file_with_env_files(
    path: &Path,
    env_files: &[String],
) -> Result<ComposeFile>
Expand description

Like parse_file, additionally loading env_files (the global --env-file flag) into the variable map used for interpolation. These take effect for the top-level file and any included files.

They replace a project .env rather than adding to it: when env_files is non-empty, .env is not read. That is docker-correct — and the opposite of what this comment used to claim, which also reached docs.rs readers. The process environment still takes precedence over both.