6 Commits

Author SHA1 Message Date
KartoffelChipss bedf8bc335 wsda 2026-03-31 11:38:49 +02:00
KartoffelChipss c5df17cd1f idk 2026-03-31 11:31:57 +02:00
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
KartoffelChipss d780a2568f Own config and storage folder to appuser 2026-03-30 23:06:50 +02:00
KartoffelChipss 823bef7bea Use dockerhub image in compose file 2026-03-30 22:35:25 +02:00
4 changed files with 26 additions and 11 deletions
-6
View File
@@ -17,14 +17,8 @@ WORKDIR /app
RUN apk add --no-cache libwebp libstdc++
RUN adduser -D -g '' appuser
COPY --from=builder /app/quay .
RUN chown -R appuser:appuser /app
USER appuser
ENV PORT=4321
ENV CONFIG_DIR=/config
ENV STORAGE_PATH=/storage
+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)
}
+21
View File
@@ -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
View File
@@ -1,8 +1,6 @@
services:
quay:
build:
context: .
dockerfile: Dockerfile
image: kartoffelchipss/quay:latest
container_name: quay
env_file:
- .env