This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
FROM golang:1.26.6-alpine@sha256:3889b425f035be855a72fb4755265311293b6d414521f0a519d819df32222d83 AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum go.work go.work.sum ./
|
||||
COPY cmd ./cmd
|
||||
COPY internal ./internal
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/pulse-worker ./cmd/worker
|
||||
|
||||
FROM alpine:3.22@sha256:14358309a308569c32bdc37e2e0e9694be33a9d99e68afb0f5ff33cc1f695dce
|
||||
RUN addgroup -S -g 65532 pulse \
|
||||
&& adduser -S -D -H -u 65532 -G pulse pulse \
|
||||
&& apk add --no-cache ca-certificates tzdata
|
||||
COPY --from=build /out/pulse-worker /usr/local/bin/pulse-worker
|
||||
COPY deploy/pulse-entrypoint.sh /usr/local/bin/pulse-entrypoint.sh
|
||||
COPY deploy/healthcheck-heartbeat.sh /usr/local/bin/pulse-healthcheck.sh
|
||||
RUN chmod 0755 /usr/local/bin/pulse-entrypoint.sh /usr/local/bin/pulse-healthcheck.sh
|
||||
USER 65532:65532
|
||||
# Heartbeat contract: docs/operations/WORKER_AGENT_HEALTHCHECK_CONTRACT.md
|
||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=20s --retries=3 CMD ["/usr/local/bin/pulse-healthcheck.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/pulse-entrypoint.sh", "/usr/local/bin/pulse-worker"]
|
||||
Reference in New Issue
Block a user