[hw-1] implement cart service

This commit is contained in:
Никита Шубин
2025-05-25 15:49:17 +00:00
parent 3d3f10647b
commit 5077f04b0c
28 changed files with 1151 additions and 2 deletions

20
cart/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM golang:1.23.1-alpine as builder
WORKDIR /build
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /server ./cmd/server/main.go
FROM scratch
COPY --from=builder server /bin/server
COPY configs/values_local.yaml /bin/config/values_local.yaml
ENV CONFIG_FILE=/bin/config/values_local.yaml
ENTRYPOINT ["/bin/server"]