mirror of
				https://github.com/linux-do/new-api.git
				synced 2025-11-04 13:23:42 +08:00 
			
		
		
		
	update build files
Signed-off-by: wozulong <>
This commit is contained in:
		
							
								
								
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@@ -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
									
									
								
							
							
						
						
									
										4
									
								
								web/.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -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
 | 
					 | 
				
			||||||
@@ -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
									
								
							
							
						
						
									
										10674
									
								
								web/yarn.lock
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user