verification/Dockerfile
Danil Solovyov 77b57819db Version 0.2
Changes:
  - rename project to remote gitlab
  - changes envs in internal\config\config.go
  - added deployments\staging\docker-compose.yaml
  - added Dockerfile
  - added staging.env
2023-07-03 16:40:20 +05:00

20 lines
686 B
Docker

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 80
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"]