StarrySkyWorld commited on
Commit
7d461bb
·
verified ·
1 Parent(s): 39c29f7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -12,14 +12,11 @@ RUN git clone https://github.com/Ve-ria/ami.2api.git .
12
  # 安装依赖
13
  RUN npm install
14
 
15
- # 构建项目(添加错误检查)
16
- RUN npm run build || echo "Build failed or not needed"
17
-
18
- # 调试:列出文件结构
19
- RUN ls -la && echo "=== Checking dist folder ===" && ls -la dist/ || echo "No dist folder"
20
 
21
  # 暴露端口
22
  EXPOSE 3000
23
 
24
- # 启动应用
25
- CMD ["npm", "start"]
 
12
  # 安装依赖
13
  RUN npm install
14
 
15
+ # 构建项目
16
+ RUN npm run build
 
 
 
17
 
18
  # 暴露端口
19
  EXPOSE 3000
20
 
21
+ # 修改启动命令,指向正确的路径
22
+ CMD ["node", "dist/src/index.js"]