ZHZ1024 commited on
Commit
63a679a
·
verified ·
1 Parent(s): 41e89c2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -4,8 +4,8 @@ FROM node:18-alpine
4
  # 设置工作目录
5
  WORKDIR /app
6
 
7
- # 安装pm2全局
8
- RUN npm install -g pm2 yarn
9
 
10
  # 克隆项目
11
  RUN apk add --no-cache git && \
@@ -18,7 +18,7 @@ RUN yarn install
18
  # 构建客户端代码
19
  RUN yarn build:web
20
 
21
- # 创建.env文件并设置JwtSecret(注意:生产环境应该使用更安全的方式管理密钥)
22
  RUN echo "JwtSecret=your_random_secret_here" > .env
23
 
24
  # 暴露端口
 
4
  # 设置工作目录
5
  WORKDIR /app
6
 
7
+ # 只安装pm2(因为yarn已经预装)
8
+ RUN npm install -g pm2
9
 
10
  # 克隆项目
11
  RUN apk add --no-cache git && \
 
18
  # 构建客户端代码
19
  RUN yarn build:web
20
 
21
+ # 创建.env文件并设置JwtSecret(生产环境应该使用更安全的方式)
22
  RUN echo "JwtSecret=your_random_secret_here" > .env
23
 
24
  # 暴露端口