Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c5df17cd1f | |||
| 5115da61ab | |||
| d4a5c0e7d8 |
+1
-5
@@ -17,14 +17,10 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN apk add --no-cache libwebp libstdc++
|
RUN apk add --no-cache libwebp libstdc++
|
||||||
|
|
||||||
RUN adduser -D -g '' appuser
|
|
||||||
|
|
||||||
COPY --from=builder /app/quay .
|
COPY --from=builder /app/quay .
|
||||||
|
|
||||||
RUN mkdir -p /storage /config && \
|
RUN mkdir -p /storage /config && \
|
||||||
chown -R appuser:appuser /app /storage /config
|
chmod -R 755 /storage /config
|
||||||
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
ENV PORT=4321
|
ENV PORT=4321
|
||||||
ENV CONFIG_DIR=/config
|
ENV CONFIG_DIR=/config
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ func FetchAndDeployBranch(repoOwner, repoName, branch, pat, destDir string) erro
|
|||||||
return fmt.Errorf("GitHub returned %s for %s", resp.Status, archiveURL)
|
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 {
|
if err != nil {
|
||||||
return fmt.Errorf("creating temp zip: %w", err)
|
return fmt.Errorf("creating temp zip: %w", err)
|
||||||
}
|
}
|
||||||
@@ -47,7 +49,7 @@ func FetchAndDeployBranch(repoOwner, repoName, branch, pat, destDir string) erro
|
|||||||
}
|
}
|
||||||
tmpZip.Close()
|
tmpZip.Close()
|
||||||
|
|
||||||
tmpDir, err := os.MkdirTemp("", "ghbranch-unpack-*")
|
tmpDir, err := os.MkdirTemp(storageRoot, "ghbranch-unpack-*")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("creating temp dir: %w", err)
|
return fmt.Errorf("creating temp dir: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user