smgc commited on
Commit
ae00909
·
verified ·
1 Parent(s): 558135a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -17
Dockerfile CHANGED
@@ -1,24 +1,11 @@
1
- FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # 安装系统依赖
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- && rm -rf /var/lib/apt/lists/*
9
 
10
- # 复制应用文件
11
- COPY app.py .
12
 
13
- # 安装 Python 依赖
14
- RUN pip install --no-cache-dir fastapi uvicorn python-dotenv grpcio pydantic protobuf
15
-
16
- # 设置环境变量
17
- ENV PYTHONPATH=/app
18
- ENV PORT=8787
19
-
20
- # 暴露端口
21
  EXPOSE 8787
22
 
23
- # 启动应用
24
- CMD ["python", "app.py"]
 
1
+ FROM node:20-alpine
2
 
3
  WORKDIR /app
4
 
5
+ COPY . .
 
 
 
6
 
7
+ RUN npm install
 
8
 
 
 
 
 
 
 
 
 
9
  EXPOSE 8787
10
 
11
+ CMD ["node", "api/index.js"]