refactor: update ts proto generator

This commit is contained in:
Steven
2023-09-20 21:28:36 +08:00
parent dd5cce63c5
commit a372d07c4b
62 changed files with 59 additions and 5110 deletions

View File

@ -1,12 +1,26 @@
# Build protobuf.
FROM golang:1.21-alpine AS protobuf
WORKDIR /protobuf-generate
COPY . .
RUN GO111MODULE=on GOBIN=/usr/local/bin go install github.com/bufbuild/buf/cmd/buf@v1.26.1
WORKDIR /protobuf-generate/proto
RUN buf generate
# Build frontend dist.
FROM node:18-alpine AS frontend
WORKDIR /frontend-build
COPY ./frontend/ .
COPY ./frontend .
COPY --from=protobuf /protobuf-generate/frontend/web/src/types/proto ./web/src/types/proto
WORKDIR /frontend-build/web
RUN corepack enable && pnpm i --frozen-lockfile
RUN corepack enable && pnpm i --frozen-lockfile
RUN pnpm build