Skip to content

Include functionailty does not actually use env files #440

@chrkr

Description

@chrkr

The new include: functionality does not actually use the env-files.

As far as I can tell, the code does read them, but they do not appear to be actually added to the interpolation environment of the compose file they belong to. As such, variables set in the env files are not applied to the included project.

Variables set in the env file of the main project are correctly applied to the included project though.

With the following set of files, the ${SUB_VAR} variable doesn't get set:

# compose.yaml
include:
  - path: subcompose.yaml
    env_file: sub.env
# subcompose.yaml
services:
  anyservice:
    image: ${SUB_VAR}
# sub.env
SUB_VAR=some_value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions