MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / UpWithTask

Function UpWithTask

agent/utils/compose/compose.go:51–59  ·  view source on GitHub ↗
(filePath string, task *task.Task, forcePull bool)

Source from the content-addressed store, hash-verified

49}
50
51func UpWithTask(filePath string, task *task.Task, forcePull bool) error {
52 if err := pullComposeImages(filePath, forcePull, task); err != nil {
53 return err
54 }
55 base, extra := getComposeBaseCmd()
56 args := append(extra, loadFiles(filePath)...)
57 args = append(args, "up", "-d")
58 return cmd.NewCommandMgr(cmd.WithTask(*task), cmd.WithTimeout(20*time.Minute)).Run(base, args...)
59}
60
61func pullComposeImages(filePath string, forcePull bool, task *task.Task) error {
62 images, err := GetComposeImages(filePath)

Callers

nothing calls this directly

Calls 4

pullComposeImagesFunction · 0.85
getComposeBaseCmdFunction · 0.85
loadFilesFunction · 0.85
RunMethod · 0.65

Tested by

no test coverage detected