mirror of https://github.com/docker/compose.git
don't apply "rebuild" watch strategy by default
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
6887a3fc3e
commit
7ffe83dc95
|
@ -104,7 +104,11 @@ func (s *composeService) Watch(ctx context.Context, project *types.Project, serv
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if config != nil && len(config.Watch) > 0 && service.Build == nil {
|
if config == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(config.Watch) > 0 && service.Build == nil {
|
||||||
// service configured with watchers but no build section
|
// service configured with watchers but no build section
|
||||||
return fmt.Errorf("can't watch service %q without a build context", service.Name)
|
return fmt.Errorf("can't watch service %q without a build context", service.Name)
|
||||||
}
|
}
|
||||||
|
@ -118,17 +122,6 @@ func (s *composeService) Watch(ctx context.Context, project *types.Project, serv
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if config == nil {
|
|
||||||
config = &DevelopmentConfig{
|
|
||||||
Watch: []Trigger{
|
|
||||||
{
|
|
||||||
Path: service.Build.Context,
|
|
||||||
Action: WatchActionRebuild,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
name := service.Name
|
name := service.Name
|
||||||
dockerIgnores, err := watch.LoadDockerIgnore(service.Build.Context)
|
dockerIgnores, err := watch.LoadDockerIgnore(service.Build.Context)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue