Add health endpoints (/healthz, /readyz), graceful shutdown with SIGTERM/SIGINT handling, multi-stage Dockerfile with distroless runtime, and a full Helm chart with security-hardened defaults.
26 lines
375 B
Docker
26 lines
375 B
Docker
FROM golang:1.25-alpine AS build
|
|
|
|
RUN apk add --no-cache nodejs npm
|
|
|
|
WORKDIR /src
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY package.json package-lock.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 make build
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
|
|
COPY --from=build /src/bin/heatguard /heatguard
|
|
|
|
EXPOSE 8080
|
|
|
|
USER nonroot:nonroot
|
|
|
|
ENTRYPOINT ["/heatguard"]
|