fix: ensure compose projects are spawned from the /tmp directory

A recent update to compose executes a stat call in the current working directory, which may have incorrect permissions for execution once the user is changed to the dokku user. This change forces all compose commands to execute in the /tmp directory by using a helper function to execute compose up/down.

Closes #7705
This commit is contained in:
Jose Diaz-Gonzalez
2025-05-24 23:31:34 -04:00
parent 41ac56e54b
commit 6ce10b5be6
8 changed files with 108 additions and 39 deletions

View File

@@ -20,6 +20,20 @@ func main() {
var err error
switch cmd {
case "compose-up":
projectName := flag.Arg(1)
composeFile := flag.Arg(2)
err = common.ComposeUp(common.ComposeUpInput{
ProjectName: projectName,
ComposeFile: composeFile,
})
case "compose-down":
projectName := flag.Arg(1)
composeFile := flag.Arg(2)
err = common.ComposeDown(common.ComposeDownInput{
ProjectName: projectName,
ComposeFile: composeFile,
})
case "copy-from-image":
appName := flag.Arg(1)
image := flag.Arg(2)