Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bedf8bc335 | |||
| c5df17cd1f | |||
| 5115da61ab | |||
| d4a5c0e7d8 | |||
| d780a2568f | |||
| 823bef7bea |
@@ -17,14 +17,8 @@ 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 chown -R appuser:appuser /app
|
|
||||||
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
ENV PORT=4321
|
ENV PORT=4321
|
||||||
ENV CONFIG_DIR=/config
|
ENV CONFIG_DIR=/config
|
||||||
ENV STORAGE_PATH=/storage
|
ENV STORAGE_PATH=/storage
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
services:
|
||||||
|
quay:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: quay
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
ports:
|
||||||
|
- '8080:4321'
|
||||||
|
volumes:
|
||||||
|
- ./config:/config
|
||||||
|
- ./storage:/storage
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost/health']
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
+1
-3
@@ -1,8 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
quay:
|
quay:
|
||||||
build:
|
image: kartoffelchipss/quay:latest
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: quay
|
container_name: quay
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|||||||
Reference in New Issue
Block a user