2023-07-03 11:40:20 +00:00
|
|
|
FROM golang:alpine as build
|
|
|
|
WORKDIR /app
|
|
|
|
ARG GITLAB_TOKEN
|
|
|
|
RUN apk add git
|
|
|
|
ENV GOPRIVATE=penahub.gitlab.yandexcloud.net/backend/penahub_common
|
|
|
|
RUN git config --global url."https://forgomod:${GITLAB_TOKEN}@penahub.gitlab.yandexcloud.net/".insteadOf "https://penahub.gitlab.yandexcloud.net/"
|
|
|
|
COPY . .
|
|
|
|
RUN go mod download
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app ./cmd/verification/main.go
|
|
|
|
|
|
|
|
FROM alpine
|
2023-07-04 12:19:17 +00:00
|
|
|
EXPOSE 7035
|
2023-07-03 11:40:20 +00:00
|
|
|
COPY --from=build app/app .
|
|
|
|
COPY --from=build app/staging.env .
|
|
|
|
ENV DOMAIN=tempgen.pena.digital
|
|
|
|
ENV YADISK_CLIENT_ID=1ed4b85c1a5c4e6abf783d3ea28fd947
|
|
|
|
ENV YADISK_CLIENT_SECRET=e1d4f385c1274dccb7d29646b802d607
|
|
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
CMD ["/app"]
|