mirror of https://github.com/docker/compose.git
Remove `compose up` timeout
Signed-off-by: aiordache <anca.iordache@docker.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
cec3187bbb
commit
55531eb6b4
|
@ -3,6 +3,9 @@ package backend
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/compose-spec/compose-go/cli"
|
||||
"github.com/compose-spec/compose-go/types"
|
||||
|
@ -84,6 +87,15 @@ func (b *Backend) Up(ctx context.Context, options cli.ProjectOptions) error {
|
|||
for k := range template.Resources {
|
||||
w.ResourceEvent(k, "PENDING", "")
|
||||
}
|
||||
|
||||
signalChan := make(chan os.Signal, 1)
|
||||
signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-signalChan
|
||||
fmt.Println("user interrupted deployment. Deleting stack...")
|
||||
b.Down(ctx, options)
|
||||
}()
|
||||
|
||||
return b.WaitStackCompletion(ctx, project.Name, operation, w)
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ func (s sdk) CreateStack(ctx context.Context, name string, template *cf.Template
|
|||
StackName: aws.String(name),
|
||||
TemplateBody: aws.String(string(json)),
|
||||
Parameters: param,
|
||||
TimeoutInMinutes: aws.Int64(15),
|
||||
TimeoutInMinutes: nil,
|
||||
Capabilities: []*string{
|
||||
aws.String(cloudformation.CapabilityCapabilityIam),
|
||||
},
|
||||
|
|
|
@ -9,11 +9,6 @@ type StackResource struct {
|
|||
Status string
|
||||
}
|
||||
|
||||
type PortMapping struct {
|
||||
Source int
|
||||
Target int
|
||||
}
|
||||
|
||||
type LoadBalancer struct {
|
||||
URL string
|
||||
TargetPort int
|
||||
|
|
Loading…
Reference in New Issue