mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
fix(server): skip file deletion errors [EE-4916] (#8443)
This commit is contained in:
parent
ab9b0c2147
commit
c8d334e603
7 changed files with 17 additions and 11 deletions
|
@ -66,7 +66,7 @@ func (manager *ComposeStackManager) Up(ctx context.Context, stack *portainer.Sta
|
|||
return errors.Wrap(err, "failed to deploy a stack")
|
||||
}
|
||||
|
||||
// Down stops and removes containers, networks, images, and volumes. Wraps `docker-compose down --remove-orphans` command
|
||||
// Down stops and removes containers, networks, images, and volumes
|
||||
func (manager *ComposeStackManager) Down(ctx context.Context, stack *portainer.Stack, endpoint *portainer.Endpoint) error {
|
||||
url, proxy, err := manager.fetchEndpointProxy(endpoint)
|
||||
if err != nil {
|
||||
|
@ -81,13 +81,9 @@ func (manager *ComposeStackManager) Down(ctx context.Context, stack *portainer.S
|
|||
return errors.Wrap(err, "failed to create env file")
|
||||
}
|
||||
|
||||
filePaths := stackutils.GetStackFilePaths(stack, false)
|
||||
|
||||
err = manager.deployer.Remove(ctx, filePaths, libstack.Options{
|
||||
WorkingDir: stack.ProjectPath,
|
||||
err = manager.deployer.Remove(ctx, stack.Name, nil, libstack.Options{
|
||||
EnvFilePath: envFilePath,
|
||||
Host: url,
|
||||
ProjectName: stack.Name,
|
||||
})
|
||||
return errors.Wrap(err, "failed to remove a stack")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue