Commit b102fcad by zhangxingmin

push

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