Реализовать защиту Lab7 и проверку отзыва worker
Skeleton contracts / contracts (pull_request) Canceled after 0s
Lab7 HTTPS integration / compose (pull_request) Canceled after 0s

This commit is contained in:
R0flyan
2026-11-27 21:53:26 +03:00
parent 20afc2c790
commit 2fa513f56c
68 changed files with 6767 additions and 64 deletions
+22
View File
@@ -0,0 +1,22 @@
FROM golang:1.27.4-bookworm@sha256:ce59b41415e2524ae99926fe1f37ce48ba8c194dcbd2a56a65436cdcefa2bd34 AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
COPY migrations ./migrations
RUN --mount=type=cache,target=/root/.cache/go-build CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /messenger .
FROM python:3.13.18-slim-bookworm@sha256:f0fa218d5b06f9b9235024fa061cde2cb141f726de52134471053d2d9b5324a3 AS worker
RUN pip install --no-cache-dir --only-binary=:all: Pillow==13.0.0
COPY --from=build /messenger /messenger
COPY pipeline.py /pipeline.py
USER 65532:65532
STOPSIGNAL SIGTERM
ENTRYPOINT ["/messenger"]
FROM scratch AS api
COPY --from=build /messenger /messenger
USER 65532:65532
ENV APP_HOST=0.0.0.0 APP_PORT=8080 GOMEMLIMIT=256MiB
EXPOSE 8080
STOPSIGNAL SIGTERM
ENTRYPOINT ["/messenger"]