forked from mtusi2026/mtusi2026lab7
ops: add PKI and HTTPS ingress
This commit is contained in:
+12
-2
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user