回退:新增docker部署方式

This commit is contained in:
bob
2025-03-13 13:34:10 +08:00
parent 298d2aaf26
commit 31addeb187
2 changed files with 0 additions and 25 deletions

View File

@@ -1,5 +0,0 @@
node_modules
.git
.xlsx
note.md
pnpm-lock.yaml

View File

@@ -1,20 +0,0 @@
# 使用 Node.js 22 轻量级镜像
FROM node:22-alpine
# 设置工作目录
WORKDIR /app
# 安装 pnpm
RUN npm install -g pnpm
# 复制项目
COPY . .
# 安装项目依赖
RUN pnpm install
# 暴露端口(根据项目实际情况修改)
EXPOSE 5173
# 启动项目
CMD ["pnpm", "dev", "--host", "0.0.0.0"]