feat: 更新代码

This commit is contained in:
suziheng
2024-12-24 10:03:50 +08:00
328 changed files with 13287 additions and 4832 deletions

View File

@@ -1,4 +1,4 @@
FROM node:16 as builder
FROM --platform=$BUILDPLATFORM node:16 AS builder
WORKDIR /web
COPY ./VERSION .
@@ -16,7 +16,9 @@ WORKDIR /web/air
RUN npm install --force
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
FROM golang AS builder2
FROM golang:alpine AS builder2
RUN apk add --no-cache g++
ENV GO111MODULE=on \
CGO_ENABLED=1 \
@@ -27,7 +29,7 @@ ADD go.mod go.sum ./
RUN go mod download
COPY . .
COPY --from=builder /web/build ./web/build
RUN go build -ldflags "-s -w -X 'github.com/songquanpeng/one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
RUN go build -trimpath -ldflags "-s -w -X 'github.com/songquanpeng/one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
FROM alpine