mirror of
https://github.com/RealKai42/qwerty-learner.git
synced 2024-11-25 16:22:53 +08:00
b0a147a15a
* chore: docker compose deployment * build: code clean * build: node18 update to node20
15 lines
348 B
Docker
15 lines
348 B
Docker
FROM node:20 AS build
|
|
|
|
# 设置工作目录
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
RUN npm config set registry https://registry.npmmirror.com
|
|
RUN npm install
|
|
RUN npm run build
|
|
|
|
# 将构建好的 React 应用复制到 Nginx 容器的默认站点目录
|
|
FROM nginx:alpine
|
|
COPY ./public/default.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/build /app
|