This commit is contained in:
renzhiyuan 2025-08-11 14:56:11 +08:00
parent 8ce8c75911
commit 3a7515ccc0
2 changed files with 2 additions and 2 deletions

View File

@ -12,4 +12,4 @@ COPY . .
EXPOSE 5000
# 确保模块名和 Flask 实例名正确(默认是 app:app
CMD ["gunicorn", "-w", "2", "-k", "gthread", "--threads", "4", "-b", "0.0.0.0:5001", "app:app"]
CMD ["gunicorn", "-w", "2", "-k", "gthread", "--threads", "4", "-b", "0.0.0.0:5000", "app:app"]

2
app.py
View File

@ -124,7 +124,7 @@ def health_check():
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5001, threaded=True)
app.run(host='0.0.0.0', port=5000, threaded=True)
else:
application = app # 兼容 WSGI 标准(如 Gunicorn