This commit is contained in:
parent
8ce8c75911
commit
3a7515ccc0
|
@ -12,4 +12,4 @@ COPY . .
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
# 确保模块名和 Flask 实例名正确(默认是 app:app)
|
# 确保模块名和 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
2
app.py
|
@ -124,7 +124,7 @@ def health_check():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
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:
|
else:
|
||||||
application = app # 兼容 WSGI 标准(如 Gunicorn)
|
application = app # 兼容 WSGI 标准(如 Gunicorn)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue