ЛР4 - БПИ2303 - Стругов - на 4

This commit is contained in:
wanderinho
2026-11-22 22:11:48 +03:00
parent ec540a1a72
commit 0a942ff3ba
32 changed files with 4387 additions and 25 deletions
+21
View File
@@ -0,0 +1,21 @@
FROM golang:1.22.5-alpine AS build
WORKDIR /src
COPY src/go.mod src/go.sum ./
RUN go mod download
COPY src/ ./
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/messenger .
FROM scratch
USER 10001:10001
COPY --from=build /out/messenger /app/messenger
EXPOSE 8080
HEALTHCHECK --interval=5s --timeout=3s --start-period=10s --retries=5 \
CMD ["/app/messenger", "-healthcheck"]
ENTRYPOINT ["/app/messenger"]