Files
aitsc/docs/deployment/Gunicorn快速参考.md

1.2 KiB

Gunicorn快速参考

🚀 一键操作命令

启动服务

./scripts/start_gunicorn.sh

停止服务

./scripts/stop_gunicorn.sh

重启服务

./scripts/restart_gunicorn.sh

查看状态

./scripts/status_gunicorn.sh

📋 常用命令

操作 命令
启动 ./scripts/start_gunicorn.sh
停止 ./scripts/stop_gunicorn.sh
重启 ./scripts/restart_gunicorn.sh
状态 ./scripts/status_gunicorn.sh
查看日志 tail -f logs/gunicorn_access.log
测试访问 curl http://localhost:5002/

🌐 访问信息

📁 重要文件

  • 配置文件: gunicorn.conf.py
  • PID文件: logs/gunicorn.pid
  • 访问日志: logs/gunicorn_access.log
  • 错误日志: logs/gunicorn_error.log
  • 管理脚本: scripts/

⚠️ 注意事项

  1. 确保在项目目录下执行命令
  2. 确保conda环境已激活
  3. 确保5002端口未被占用
  4. 确保防火墙已开放5002端口