fix(api): use the folder of the stackfile as working dir when deploying a stack (#1869)

pull/1872/head
Anthony Lapenna 7 years ago committed by GitHub
parent 2327d696e0
commit 6360e6a20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,7 +81,8 @@ func (manager *StackManager) Deploy(stack *portainer.Stack, prune bool, endpoint
env = append(env, envvar.Name+"="+envvar.Value)
}
return runCommandAndCaptureStdErr(command, args, env, stack.ProjectPath)
stackFolder := path.Dir(stackFilePath)
return runCommandAndCaptureStdErr(command, args, env, stackFolder)
}
// Remove executes the docker stack rm command.

Loading…
Cancel
Save