separated quotation and payments

This commit is contained in:
Stephan D
2026-02-10 18:29:47 +01:00
parent 6745bc0f6f
commit 296cc7b86a
163 changed files with 13516 additions and 191 deletions

View File

@@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1.7
ARG TARGETOS=linux
ARG TARGETARCH=amd64
FROM golang:alpine AS build
ARG APP_VERSION=dev
ARG GIT_REV=unknown
ARG BUILD_BRANCH=unknown
ARG BUILD_DATE=unknown
ARG BUILD_USER=ci
ENV GO111MODULE=on
ENV PATH="/go/bin:${PATH}"
WORKDIR /src
COPY . .
RUN apk add --no-cache bash git build-base protoc protobuf-dev \
&& go install google.golang.org/protobuf/cmd/protoc-gen-go@latest \
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest \
&& bash ci/scripts/proto/generate.sh
WORKDIR /src/api/payments/quotation
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build -trimpath -ldflags "\
-s -w \
-X github.com/tech/sendico/payments/quotation/internal/appversion.Version=${APP_VERSION} \
-X github.com/tech/sendico/payments/quotation/internal/appversion.Revision=${GIT_REV} \
-X github.com/tech/sendico/payments/quotation/internal/appversion.Branch=${BUILD_BRANCH} \
-X github.com/tech/sendico/payments/quotation/internal/appversion.BuildUser=${BUILD_USER} \
-X github.com/tech/sendico/payments/quotation/internal/appversion.BuildDate=${BUILD_DATE}" \
-o /out/payments-quotation .
FROM alpine:latest AS runtime
RUN apk add --no-cache ca-certificates tzdata wget
WORKDIR /app
COPY api/payments/quotation/config.yml /app/config.yml
COPY --from=build /out/payments-quotation /app/payments-quotation
EXPOSE 50064 9414
ENTRYPOINT ["/app/payments-quotation"]
CMD ["--config.file", "/app/config.yml"]