dan92 commited on
Commit
02386d4
·
verified ·
1 Parent(s): 9ebea03

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -3
  2. requirements.txt +7 -0
Dockerfile CHANGED
@@ -1,11 +1,24 @@
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
- RUN pip install --no-cache-dir flask flask-cors requests tiktoken cachetools apscheduler
 
6
 
7
- COPY . .
 
8
 
 
 
 
 
 
 
 
 
 
9
  EXPOSE 3000
10
 
11
- CMD flask run --host=0.0.0.0 --port=3000
 
 
1
  FROM python:3.9-slim
2
 
3
+ # 设置工作目录
4
  WORKDIR /app
5
 
6
+ # 复制依赖文件
7
+ COPY requirements.txt .
8
 
9
+ # 安装依赖
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
 
12
+ # 复制应用程序文件
13
+ COPY app.py .
14
+ COPY register_bot.py .
15
+
16
+ # 设置环境变量
17
+ ENV FLASK_APP=app.py
18
+ ENV FLASK_RUN_HOST=0.0.0.0
19
+
20
+ # 暴露端口
21
  EXPOSE 3000
22
 
23
+ # 运行应用程序
24
+ CMD ["flask", "run"]
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ flask==2.1.0
2
+ flask_cors==3.0.10
3
+ requests==2.27.1
4
+ tiktoken==0.4.0
5
+ cachetools==5.2.0
6
+ urllib3==1.26.9
7
+ beautifulsoup4==4.11.1