Update Dockerfile
Browse files- Dockerfile +4 -17
Dockerfile
CHANGED
@@ -1,24 +1,11 @@
|
|
1 |
-
FROM
|
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"]
|
|