mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 16:36:37 +08:00
update build files
Signed-off-by: wozulong <>
This commit is contained in:
parent
f35e63e3f3
commit
8b55116563
12
Dockerfile
12
Dockerfile
@ -2,13 +2,14 @@ FROM node:16-slim as builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY web/package.json .
|
||||
RUN npm install
|
||||
COPY web/yarn.lock .
|
||||
RUN yarn install
|
||||
COPY ./web .
|
||||
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
|
||||
RUN apk add build-base
|
||||
RUN apk add --no-cache build-base
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=1 \
|
||||
GOOS=linux
|
||||
@ -23,11 +24,6 @@ RUN go mod tidy \
|
||||
|
||||
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 /
|
||||
EXPOSE 3000
|
||||
WORKDIR /data
|
||||
|
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ all: build-frontend start-backend
|
||||
|
||||
build-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:
|
||||
@echo "Starting backend dev server..."
|
||||
|
4
web/.gitignore
vendored
4
web/.gitignore
vendored
@ -21,6 +21,4 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.idea
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
.idea/
|
@ -50,7 +50,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "2.8.8",
|
||||
"typescript": "4.4.2"
|
||||
"typescript": "4.4.2",
|
||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
|
10674
web/yarn.lock
Normal file
10674
web/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user