Closed cdrage closed 7 years ago
I just hit this as well. Was expecting the serviceConfig.EnvFile
field to be populated but it's empty even though the contents of the env files end up in serviceConfig.Environment
. Curious what the design intent was on this? I'd like to be able to determine which file a particular env var came from.
// ServiceConfig holds version 2 of libcompose service configuration
type ServiceConfig struct {
EnvFile yaml.Stringorslice `yaml:"env_file,omitempty"`
Environment yaml.MaporEqualSlice `yaml:"environment,omitempty"`
Using this an example:
It seems that
env_file
isn't being properly populated to the ServiceConfig.It's hard to explain without showing code, but essentially we use libcompose to parse a Docker Compose file and
env_file
within ServiceConfig is blank.Yes, it goes through the file and grabs the environment variables correctly, but within the libcompose code,
env_file
isn't being shown within ServiceConfig (appears as a blank string).I'll try to pull up an example later :+1: