修改端口为7400

This commit is contained in:
2025-11-05 13:32:14 +08:00
parent 3a8a498648
commit d69d0158d8
9 changed files with 28 additions and 28 deletions

View File

@@ -42,14 +42,14 @@ RUN mkdir -p templates static/css static/js logs data models
RUN chmod +x start_web.py
# 暴露端口
EXPOSE 5000
EXPOSE 7400
# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:5000/health')" || exit 1
CMD python -c "import requests; requests.get('http://localhost:7400/health')" || exit 1
# 使用gunicorn启动应用生产环境
# 注意默认配置使用2个worker适合1GB+内存的机器
# 如果机器内存较小512MB-1GB建议修改为 "--workers", "1"
# 使用 python -m gunicorn 确保可以找到 gunicorn即使可执行文件不在PATH中也能工作
CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "web_app:app"]
CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:7400", "--workers", "2", "--timeout", "120", "--access-logfile", "-", "--error-logfile", "-", "web_app:app"]