kklljj commited on
Commit
f4405c0
·
verified ·
1 Parent(s): bef66e9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -6
Dockerfile CHANGED
@@ -1,26 +1,20 @@
1
- # 使用 Node.js 20(关键修复!)
2
  FROM node:20-slim
3
 
4
  WORKDIR /app
5
 
6
- # 安装依赖
7
  RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
8
 
9
- # 克隆 cursor2api
10
  RUN git clone https://github.com/7836246/cursor2api.git .
11
 
12
- # 安装依赖
13
  RUN npm install
14
  RUN npm run build
15
 
16
- # 环境变量
17
  ENV PORT=3010 \
18
  NODE_ENV=production \
19
  CORS_ORIGIN=*
20
 
21
  EXPOSE 3010
22
 
23
- # 健康检查
24
  HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
25
  CMD curl -f http://localhost:3010/health || exit 1
26
 
 
 
1
  FROM node:20-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
6
 
 
7
  RUN git clone https://github.com/7836246/cursor2api.git .
8
 
 
9
  RUN npm install
10
  RUN npm run build
11
 
 
12
  ENV PORT=3010 \
13
  NODE_ENV=production \
14
  CORS_ORIGIN=*
15
 
16
  EXPOSE 3010
17
 
 
18
  HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
19
  CMD curl -f http://localhost:3010/health || exit 1
20