diff --git a/podman/main.go b/podman/main.go index 7a70ca3..d47497a 100644 --- a/podman/main.go +++ b/podman/main.go @@ -91,6 +91,10 @@ func CreateContainer(definition service_definition.ContainerDefinition, knownVol "--replace", } + if definition.EnvFile != "" { + args = append(args, []string{"--env-file", definition.EnvFile}...) + } + for _, volume := range definition.Volumes { var host string var suffix string @@ -129,6 +133,7 @@ func CreateContainer(definition service_definition.ContainerDefinition, knownVol } if err := command.Wait(); err != nil { + log.Fatal(args) return err } diff --git a/service_definition/main.go b/service_definition/main.go index 713a474..53f5805 100644 --- a/service_definition/main.go +++ b/service_definition/main.go @@ -27,6 +27,7 @@ type ContainerDefinition struct { Name string `yaml:"name"` Image string `yaml:"image"` Volumes []VolumeConfiguration `yaml:"volumes"` + EnvFile string `yaml:"env-file"` ExtraArgs []string `yaml:"extra-args"` }