Skip to content

Commit 7aea935

Browse files
committed
Use sane defaults for compose
1 parent 73b7aaf commit 7aea935

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dep/compose/compose.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ type Compose struct {
2222
ready func(tc.ComposeStack) error
2323
}
2424

25+
// New creates new Compose depencency.
26+
// By default it applies tc.Wait(true) and tc.RemoveOrphans(true) options.
27+
// Those can be overwritten by WithUpOptions and WithDownOptions.
2528
func New(opts ...Opt) *Compose {
2629
return &Compose{
27-
opts: opts,
28-
ready: func(cs tc.ComposeStack) error { return nil },
30+
opts: opts,
31+
ready: func(cs tc.ComposeStack) error { return nil },
32+
upOpts: []tc.StackUpOption{tc.Wait(true)},
33+
downOpts: []tc.StackDownOption{tc.RemoveOrphans(true)},
2934
}
3035
}
3136

0 commit comments

Comments
 (0)