feat: 添加v2.2.0部署脚本和工具文件

This commit is contained in:
Jowe
2025-12-31 01:33:47 +08:00
parent f5f73025d7
commit 4d3163575c
24 changed files with 5428 additions and 1 deletions

44
gunicorn_config.py Normal file
View File

@@ -0,0 +1,44 @@
# Gunicorn配置文件
import os
# 绑定地址和端口
bind = "0.0.0.0:5000"
# 工作进程数 (推荐: CPU核心数 * 2 + 1)
workers = 4
# 工作线程数
threads = 2
# 工作模式
worker_class = "sync"
# 超时时间(秒)
timeout = 120
# 访问日志
accesslog = "logs/access.log"
# 错误日志
errorlog = "logs/error.log"
# 日志级别
loglevel = "info"
# 进程名称
proc_name = "zjpb_app"
# 守护进程模式设置为False由systemd或supervisor管理
daemon = False
# PID文件
pidfile = "logs/gunicorn.pid"
# 预加载应用(提高性能)
preload_app = True
# 优雅重启超时
graceful_timeout = 30
# 保持连接
keepalive = 5