diff --git a/Dockerfile b/Dockerfile index 77fb6a3..80a978b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,20 @@ -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 -EXPOSE 7035 -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"] +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 +EXPOSE 7035 +COPY --from=build app/app . +COPY --from=build app/staging.env . +COPY --from=build app/assets ./assets +ENV DOMAIN=tempgen.pena.digital +ENV YADISK_CLIENT_ID=1ed4b85c1a5c4e6abf783d3ea28fd947 +ENV YADISK_CLIENT_SECRET=e1d4f385c1274dccb7d29646b802d607 +RUN apk add --no-cache ca-certificates +CMD ["/app"] diff --git a/internal/app/shutdown.go b/internal/app/shutdown.go index 3f38120..852e25d 100644 --- a/internal/app/shutdown.go +++ b/internal/app/shutdown.go @@ -26,7 +26,7 @@ func gracefulShutdown(ctx context.Context, logger *zap.Logger, httpSrv *server.H } if err := mongoClient.Disconnect(ctx); err != nil { - logger.Error("BoltDB", zap.Error(err)) + logger.Error("MongoDB", zap.Error(err)) } }