Browse Source

only stop services started by `up` on interruption

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 3 years ago
parent
commit
ed38fe0da8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      pkg/compose/up.go

+ 2 - 0
pkg/compose/up.go

@@ -62,11 +62,13 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
 				<-signalChan
 				<-signalChan
 				s.Kill(ctx, project.Name, api.KillOptions{ //nolint:errcheck
 				s.Kill(ctx, project.Name, api.KillOptions{ //nolint:errcheck
 					Services: options.Create.Services,
 					Services: options.Create.Services,
+					Project:  project,
 				})
 				})
 			}()
 			}()
 
 
 			return s.Stop(ctx, project.Name, api.StopOptions{
 			return s.Stop(ctx, project.Name, api.StopOptions{
 				Services: options.Create.Services,
 				Services: options.Create.Services,
+				Project:  project,
 			})
 			})
 		})
 		})
 	}
 	}