forked from mtusi2026/mtusi2026lab6
feat: add bounded observability and verified SLO incident alerts
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
FROM golang:1.26.1-alpine3.23 AS build
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY cmd/ ./cmd/
|
||||
COPY internal/ ./internal/
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server
|
||||
|
||||
FROM alpine:3.23 AS runtime
|
||||
RUN apk add --no-cache ca-certificates libwebp-tools
|
||||
COPY --from=build /out/server /server
|
||||
USER 65532:65532
|
||||
ENV APP_HOST=0.0.0.0 APP_PORT=8080 GOMEMLIMIT=160MiB
|
||||
EXPOSE 8080
|
||||
STOPSIGNAL SIGTERM
|
||||
HEALTHCHECK --interval=5s --timeout=3s --start-period=3s --retries=3 CMD ["/server", "healthcheck"]
|
||||
ENTRYPOINT ["/server"]
|
||||
Reference in New Issue
Block a user