mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 19:24:21 +01:00 
			
		
		
		
	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 ( | import ( | ||||||
| 	"context" | 	"context" | ||||||
| 	"fmt" | 	"fmt" | ||||||
|  | 	"os" | ||||||
|  | 	"os/signal" | ||||||
|  | 	"syscall" | ||||||
| 
 | 
 | ||||||
| 	"github.com/compose-spec/compose-go/cli" | 	"github.com/compose-spec/compose-go/cli" | ||||||
| 	"github.com/compose-spec/compose-go/types" | 	"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 { | 	for k := range template.Resources { | ||||||
| 		w.ResourceEvent(k, "PENDING", "") | 		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) | 	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), | 		StackName:        aws.String(name), | ||||||
| 		TemplateBody:     aws.String(string(json)), | 		TemplateBody:     aws.String(string(json)), | ||||||
| 		Parameters:       param, | 		Parameters:       param, | ||||||
| 		TimeoutInMinutes: aws.Int64(15), | 		TimeoutInMinutes: nil, | ||||||
| 		Capabilities: []*string{ | 		Capabilities: []*string{ | ||||||
| 			aws.String(cloudformation.CapabilityCapabilityIam), | 			aws.String(cloudformation.CapabilityCapabilityIam), | ||||||
| 		}, | 		}, | ||||||
|  | |||||||
| @ -9,11 +9,6 @@ type StackResource struct { | |||||||
| 	Status    string | 	Status    string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| type PortMapping struct { |  | ||||||
| 	Source int |  | ||||||
| 	Target int |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| type LoadBalancer struct { | type LoadBalancer struct { | ||||||
| 	URL           string | 	URL           string | ||||||
| 	TargetPort    int | 	TargetPort    int | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user