Skip to content

Commit

Permalink
Allow docker-compose.*.yml as well as docker-compose.*.yaml, fixes #2217
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed May 11, 2020
1 parent 1db79ff commit bb80820
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/ddevapp/ddevapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ func (app *DdevApp) ImportFiles(importPath string, extPath string) error {
}

// ComposeFiles returns a list of compose files for a project.
// It has to put the .ddev/docker-compose-*.yaml first
// It has to put the .ddev/docker-compose.*.y*ml first
// It has to put the docker-compose.override.y*l last
func (app *DdevApp) ComposeFiles() ([]string, error) {
dir, _ := os.Getwd()
Expand All @@ -709,17 +709,17 @@ func (app *DdevApp) ComposeFiles() ([]string, error) {
if err != nil {
return nil, err
}
files, err := filepath.Glob("docker-compose.*.yaml")
files, err := filepath.Glob("docker-compose.*.y*ml")
if err != nil {
return []string{}, fmt.Errorf("unable to glob docker-compose.*.yaml in %s: err=%v", app.AppConfDir(), err)
return []string{}, fmt.Errorf("unable to glob docker-compose.*.y*ml in %s: err=%v", app.AppConfDir(), err)
}

mainfile := app.DockerComposeYAMLPath()
if !fileutil.FileExists(mainfile) {
return nil, fmt.Errorf("failed to find %s", mainfile)
}

overrides, err := filepath.Glob("docker-compose.override.yaml")
overrides, err := filepath.Glob("docker-compose.override.y*ml")
util.CheckErr(err)

orderedFiles := make([]string, 1)
Expand Down

0 comments on commit bb80820

Please sign in to comment.