2 Commits

Author SHA1 Message Date
KartoffelChipss 5115da61ab Set permissions for dirs in docker image 2026-03-31 11:26:33 +02:00
KartoffelChipss d4a5c0e7d8 Create temp files in storage path 2026-03-31 11:12:03 +02:00
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ RUN adduser -D -g '' appuser
COPY --from=builder /app/quay .
RUN mkdir -p /storage /config && \
chown -R appuser:appuser /app /storage /config
chmod -R 777 /storage /config && \
chown -R appuser:appuser /app
USER appuser
+4 -2
View File
@@ -35,7 +35,9 @@ func FetchAndDeployBranch(repoOwner, repoName, branch, pat, destDir string) erro
return fmt.Errorf("GitHub returned %s for %s", resp.Status, archiveURL)
}
tmpZip, err := os.CreateTemp("", "ghbranch-*.zip")
storageRoot := filepath.Dir(destDir)
tmpZip, err := os.CreateTemp(storageRoot, "ghbranch-*.zip")
if err != nil {
return fmt.Errorf("creating temp zip: %w", err)
}
@@ -47,7 +49,7 @@ func FetchAndDeployBranch(repoOwner, repoName, branch, pat, destDir string) erro
}
tmpZip.Close()
tmpDir, err := os.MkdirTemp("", "ghbranch-unpack-*")
tmpDir, err := os.MkdirTemp(storageRoot, "ghbranch-unpack-*")
if err != nil {
return fmt.Errorf("creating temp dir: %w", err)
}