dan92 commited on
Commit
3cbbbf4
·
verified ·
1 Parent(s): 7a19dbb

Upload 6 files

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -3
  2. app.py +2 -1
  3. requirements.txt +0 -1
Dockerfile CHANGED
@@ -10,7 +10,7 @@ COPY requirements.txt .
10
  RUN pip install --upgrade pip && \
11
  pip install --no-cache-dir -r requirements.txt gunicorn
12
 
13
- # 复制应用程序文件和模板
14
  COPY app.py .
15
  COPY register_bot.py .
16
 
@@ -22,5 +22,5 @@ ENV PYTHONUNBUFFERED=1
22
  # 暴露端口
23
  EXPOSE 3000
24
 
25
- # 使用 gunicorn 作为生产级 WSGI 服务器,添加错误日志
26
- CMD ["gunicorn", "--bind", "0.0.0.0:3000", "--workers", "4", "--log-level", "debug", "--error-logfile", "-", "app:app"]
 
10
  RUN pip install --upgrade pip && \
11
  pip install --no-cache-dir -r requirements.txt gunicorn
12
 
13
+ # 复制应用程序文件
14
  COPY app.py .
15
  COPY register_bot.py .
16
 
 
22
  # 暴露端口
23
  EXPOSE 3000
24
 
25
+ # 使用 gunicorn 作为生产级 WSGI 服务器
26
+ CMD ["gunicorn", "--bind", "0.0.0.0:3000", "--workers", "4", "app:app"]
app.py CHANGED
@@ -782,4 +782,5 @@ if __name__ == "__main__":
782
  health_check_thread.start()
783
 
784
  port = int(os.environ.get("PORT", 3000))
785
- app.run(debug=False, host='0.0.0.0', port=port, threaded=True)
 
 
782
  health_check_thread.start()
783
 
784
  port = int(os.environ.get("PORT", 3000))
785
+ app.run(debug=False, host='0.0.0.0', port=port, threaded=True)
786
+
requirements.txt CHANGED
@@ -8,4 +8,3 @@ urllib3==1.26.9
8
  beautifulsoup4==4.11.1
9
  Pillow==9.2.0
10
  lxml==4.9.1
11
- jinja2>=3.0.0
 
8
  beautifulsoup4==4.11.1
9
  Pillow==9.2.0
10
  lxml==4.9.1