chore: port lab 1 solution
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
FROM golang:1.25.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /out/server ./cmd/server
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/server .
|
||||
COPY contracts ./contracts
|
||||
COPY web/swagger ./web/swagger
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD ["/app/server", "healthcheck"]
|
||||
|
||||
ENTRYPOINT ["/app/server"]
|
||||
Reference in New Issue
Block a user