ops: add PKI and HTTPS ingress

This commit is contained in:
2026-11-04 23:05:11 +03:00
parent 951e554e06
commit 58c9bb027b
26 changed files with 572 additions and 56 deletions
+12 -2
View File
@@ -1,9 +1,19 @@
FROM alpine:3.24.2 AS security-test
RUN apk add --no-cache curl openssl
WORKDIR /src
COPY scripts/test-tls-matrix.sh /src/scripts/test-tls-matrix.sh
CMD ["/bin/sh", "/src/scripts/test-tls-matrix.sh"]
FROM golang:1.26.5-alpine3.24 AS build
ARG GOPROXY=https://proxy.golang.org
WORKDIR /src
ENV GOMAXPROCS=2 GOMEMLIMIT=1GiB
RUN apk add --no-cache git
COPY go.mod go.sum ./
RUN go mod download
RUN GOPROXY="$GOPROXY" go mod download
COPY . .
RUN go build -p=1 -o /out/messenger ./cmd/messenger
RUN go build -p=1 -o /out/lab5experiment ./cmd/lab5experiment
@@ -41,5 +51,5 @@ COPY --from=build --chown=app:app /out/lab5experiment /app/lab5experiment
USER app
WORKDIR /app
HEALTHCHECK --interval=10s --timeout=2s --start-period=5s --retries=3 \
CMD wget -q -O /dev/null "http://127.0.0.1:${APP_PORT}/health/ready" || exit 1
CMD wget -q -O /dev/null "http://127.0.0.1:8082/health/ready" || exit 1
CMD ["/app/messenger"]