Commit b102fcad by zhangxingmin

push

parent 0dfc7a30
# 使用 Node LTS 作为基础镜像
FROM node:18-alpine
# 设置工作目录
# 构建阶段
FROM node:16-alpine as build-stage
WORKDIR /app
# 复制依赖清单
COPY package*.json ./
# 安装依赖(包含 HBuilderX CLI 工具)
RUN npm install -g @dcloudio/uni-cli && \
npm install
# 复制源码(注意排除无关文件)
RUN npm install
COPY . .
# 构建 H5 版本(根据实际项目调整)
RUN npm run build:h5
# 生产阶段
FROM nginx:stable-alpine
COPY --from=build-stage /app/dist /usr/share/nginx/html
......
......@@ -19,18 +19,14 @@
"dayjs": "^1.11.13",
"echarts": "^5.4.1",
"js-sha256": "^0.11.1",
"nanoid": "^4.0.0",
"uview-ui": "^2.0.31",
"moment": "^2.29.4"
"nanoid": "^4.0.0"
},
"devDependencies": {
"less": "^4.3.0",
"@dcloudio/uni-cli": "^3.0.0"
"less": "^4.3.0"
},
"scripts": {
"dev": "uni -p",
"build:h5": "uni build --platform h5",
"build:weapp": "uni build --platform mp-weixin",
"build:harmony": "uni build --platform harmonyos"
"build:weapp": "uni build --platform mp-weixin"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment