Spaces:
Paused
Paused
Upload 6 files
Browse files- Dockerfile +3 -3
- app.py +2 -1
- 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", "
|
|
|
|
| 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
|
|
|