feat: multi-feature update

This commit is contained in:
chaos
2026-06-15 06:16:16 +08:00
parent 6f415428d3
commit 04d30f9dd1
58 changed files with 4610 additions and 419 deletions
+12 -1
View File
@@ -20,8 +20,18 @@ COPY ./web/classic ./classic
COPY ./VERSION /build/VERSION
RUN cd classic && VITE_REACT_APP_VERSION=$(cat /build/VERSION) bun run build
# image-gen: a small Vue 3 + Vite SPA that lives in web/image-gen/.
# It uses npm (its own package-lock.json), so we use node:20 instead of bun.
FROM node:20-alpine@sha256:49f3aca83b15186f1b7b8b21b06789a73ed1a4f9c4f1a0e3ce4a1ae9e5c8e3f5b AS builder-image-gen
WORKDIR /build/web/image-gen
COPY web/image-gen/package.json web/image-gen/package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY web/image-gen ./
RUN npm run build
FROM golang:1.26.1-alpine@sha256:2389ebfa5b7f43eeafbd6be0c3700cc46690ef842ad962f6c5bd6be49ed82039 AS builder2
ENV GO111MODULE=on CGO_ENABLED=0
ENV GO111MODULE=on CGO_ENABLED=0 GOPROXY=https://goproxy.cn,direct
ARG TARGETOS
ARG TARGETARCH
@@ -36,6 +46,7 @@ RUN go mod download
COPY . .
COPY --from=builder /build/web/default/dist ./web/default/dist
COPY --from=builder-classic /build/web/classic/dist ./web/classic/dist
COPY --from=builder-image-gen /build/web/image-gen/dist ./web/image-gen/dist
RUN go build -ldflags "-s -w -X 'github.com/QuantumNous/new-api/common.Version=$(cat VERSION)'" -o new-api
FROM debian:bookworm-slim@sha256:f06537653ac770703bc45b4b113475bd402f451e85223f0f2837acbf89ab020a