Skip to content

Commit d30635e

Browse files
committed
re-implement compose logic
- build observed state - compute reconciliation plan by comparing observed vs desired state - execute plan this allow to decorelate reconciliation (aka "convergence") logic from docker API, and write simpler and efficient tests to cover various scenarios Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
1 parent e8c2143 commit d30635e

17 files changed

+3350
-433
lines changed

cmd/compose/compose.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"syscall"
3131

3232
"github.com/compose-spec/compose-go/v2/cli"
33+
"github.com/compose-spec/compose-go/v2/consts"
3334
"github.com/compose-spec/compose-go/v2/dotenv"
3435
"github.com/compose-spec/compose-go/v2/loader"
3536
composepaths "github.com/compose-spec/compose-go/v2/paths"
@@ -221,7 +222,7 @@ func makeJSONError(err error) error {
221222
}
222223

223224
func (o *ProjectOptions) addProjectFlags(f *pflag.FlagSet) {
224-
f.StringArrayVar(&o.Profiles, "profile", []string{}, "Specify a profile to enable")
225+
f.StringArrayVar(&o.Profiles, "profile", defaultStringArrayVar(consts.ComposeProfiles), "Specify a profile to enable")
225226
f.StringVarP(&o.ProjectName, "project-name", "p", "", "Project name")
226227
f.StringArrayVarP(&o.ConfigPaths, "file", "f", []string{}, "Compose configuration files")
227228
f.StringArrayVar(&o.insecureRegistries, "insecure-registry", []string{}, "Use insecure registry to pull Compose OCI artifacts. Doesn't apply to images")

0 commit comments

Comments
 (0)