kingtest commited on
Commit
b36277c
·
verified ·
1 Parent(s): 9ba4fe1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用Python官方镜像作为基础镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 安装git
5
+ RUN apt-get update && apt-get install -y git
6
+
7
+ # 设置工作目录
8
+ WORKDIR /app
9
+
10
+ # 克隆仓库
11
+ RUN git clone https://github.com/w1501052468/aichats-reverse.git .
12
+
13
+ # 安装依赖
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # 设置环境变量
17
+ ENV APP_SECRET=your_secret_here
18
+
19
+ # 暴露服务端口(如果需要的话,请替换为实际端口)
20
+ EXPOSE 8002
21
+
22
+ # 运行服务
23
+ CMD ["python", "/app/api/main.py"]