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

This commit is contained in:
wanderinho
2026-11-10 15:19:31 +03:00
parent 0ab3a341aa
commit bdccb3ad7d
33 changed files with 3591 additions and 23 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"]