import lab3 files

This commit is contained in:
Голиков Maximillian Антон
2026-10-18 21:14:01 +03:00
parent ec540a1a72
commit 76322040e5
64 changed files with 4446 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
FROM golang:1.26.1-alpine AS builder
WORKDIR /src
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ .
RUN CGO_ENABLED=0 GOOS=linux go build \
-trimpath \
-ldflags="-s -w" \
-o /out/server \
./cmd/server
FROM alpine:3.20
RUN adduser -D -u 1000 app
COPY --from=builder /out/server /server
EXPOSE 8080
USER app
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD wget -q -O - http://127.0.0.1:8080/health/live >/dev/null || exit 1
ENTRYPOINT ["/server"]