chore: docker compose deployment (#771)

* chore: docker compose deployment

* build: code clean

* build: node18 update to node20
This commit is contained in:
luo jiyin
2024-06-11 17:04:11 +08:00
committed by GitHub
parent 89b44924bf
commit b0a147a15a
2 changed files with 8 additions and 31 deletions

View File

@@ -1,14 +1,11 @@
FROM node:18 AS build
FROM node:20 AS build
# 设置工作目录
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm config set registry https://registry.npmmirror.com
RUN npm install
RUN npm run build
# 将构建好的 React 应用复制到 Nginx 容器的默认站点目录