forked from mtusi2026/mtusi2026lab5
feat(lab5): durable async attachment pipeline through grade 4
- RabbitMQ quorum queue, persistent messages and publisher confirms - S3 staging plus PostgreSQL attachments/jobs outbox transaction - worker variants (thumbnail, crop, optimized WebP), DB lease and lease sweeper - jittered retry, permanent failures, explicit replay and admission cap - deterministic crash hooks, resilience script and evidence for grade 4 - async-aware custom tests, oversized pixel case, docs and changelog
This commit is contained in:
+6
-2
@@ -5,15 +5,19 @@ COPY app/go.mod app/go.sum ./
|
||||
RUN go mod download
|
||||
COPY app/ ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server \
|
||||
&& CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/worker ./cmd/worker \
|
||||
&& CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/reconciler ./cmd/reconciler
|
||||
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN apk add --no-cache ca-certificates \
|
||||
&& addgroup -S -g 10001 app \
|
||||
# AGENT: the runtime image needs no package manager at build time; copying the
|
||||
# CA bundle from the Go builder avoids a network dependency on Alpine mirrors.
|
||||
RUN addgroup -S -g 10001 app \
|
||||
&& adduser -S -u 10001 -G app app
|
||||
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=build /out/server /usr/local/bin/server
|
||||
COPY --from=build /out/worker /usr/local/bin/worker
|
||||
COPY --from=build /out/reconciler /usr/local/bin/reconciler
|
||||
|
||||
USER app
|
||||
|
||||
Reference in New Issue
Block a user