重构前端

This commit is contained in:
sky22333
2026-07-12 01:19:44 +08:00
parent 26b45c98bf
commit 79f23d13ad
42 changed files with 3641 additions and 3353 deletions

View File

@@ -1,3 +1,11 @@
FROM node:24-alpine AS frontend
WORKDIR /web
COPY web/package.json web/package-lock.json ./
RUN npm ci
COPY web/ .
RUN npm run build
FROM golang:1.26-alpine AS builder
ARG TARGETARCH
@@ -8,6 +16,7 @@ COPY src/go.mod src/go.sum ./
RUN apk add --no-cache upx && go mod download
COPY src/ .
COPY --from=frontend /src/dist ./dist
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-s -w -X main.Version=${VERSION}" -trimpath -o hubproxy . && upx -9 hubproxy