update build files

Signed-off-by: wozulong <>
This commit is contained in:
wozulong 2024-03-20 18:31:22 +08:00
parent f35e63e3f3
commit 8b55116563
5 changed files with 10682 additions and 13 deletions

View File

@ -2,13 +2,14 @@ FROM node:16-slim as builder
WORKDIR /build WORKDIR /build
COPY web/package.json . COPY web/package.json .
RUN npm install COPY web/yarn.lock .
RUN yarn install
COPY ./web . COPY ./web .
COPY ./VERSION . COPY ./VERSION .
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) yarn build
FROM golang:1.19-alpine AS builder2 FROM golang:1.19-alpine AS builder2
RUN apk add build-base RUN apk add --no-cache build-base
ENV GO111MODULE=on \ ENV GO111MODULE=on \
CGO_ENABLED=1 \ CGO_ENABLED=1 \
GOOS=linux GOOS=linux
@ -23,11 +24,6 @@ RUN go mod tidy \
FROM alpine FROM alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache ca-certificates tzdata \
&& update-ca-certificates 2>/dev/null || true
COPY --from=builder2 /build/one-api / COPY --from=builder2 /build/one-api /
EXPOSE 3000 EXPOSE 3000
WORKDIR /data WORKDIR /data

View File

@ -7,7 +7,7 @@ all: build-frontend start-backend
build-frontend: build-frontend:
@echo "Building frontend..." @echo "Building frontend..."
@cd $(FRONTEND_DIR) && npm install && DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build @cd $(FRONTEND_DIR) && yarn install && DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) yarn build
start-backend: start-backend:
@echo "Starting backend dev server..." @echo "Starting backend dev server..."

4
web/.gitignore vendored
View File

@ -21,6 +21,4 @@
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
.idea .idea/
package-lock.json
yarn.lock

View File

@ -50,7 +50,8 @@
}, },
"devDependencies": { "devDependencies": {
"prettier": "2.8.8", "prettier": "2.8.8",
"typescript": "4.4.2" "typescript": "4.4.2",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
}, },
"prettier": { "prettier": {
"singleQuote": true, "singleQuote": true,

10674
web/yarn.lock Normal file

File diff suppressed because it is too large Load Diff