gunicorn +nginx+python3 部署flask项目(gevent+gevent)--依赖的包

简介: gunicorn +nginx+python3 部署(gevent+gevent)--依赖的包bind = ["0.0.0.0:5010"]workers = 4backlog = 2048worker_class = 'gevent'forwarded_allow_ips = "*"keepa...

gunicorn +nginx+python3 部署(gevent+gevent)--依赖的包

bind = ["0.0.0.0:5010"]
workers = 4
backlog = 2048
worker_class = 'gevent'
forwarded_allow_ips = "*"
keepalive = 5
timeout = 300
worker_connections = 65535
loglevel = "info"
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
accesslog = '/root/tv/tv_api/zhijian_tv_api/gunicorn_access.log'
errorlog = '/root/tv/tv_api/zhijian_tv_api/gunicorn_error.log'

运行命令----gunicorn -c gunicorn_conf.py manager:app -D

nginx.conf ----不动

nginx/conf.d 
 server {
               listen 80;
               server_name max-tv.net.cn, www.max-tv.net.cn;
               return 301 https://www.max-tv.net.cn$request_uri;
       }
      server {
              listen 443 ssl;
              server_name www.max-tv.net.cn;
              ssl_certificate /etc/nginx/ssl_h5/2425677_max-tv.net.cn.pem;
              ssl_certificate_key /etc/nginx/ssl_h5/2425677_max-tv.net.cn.key;
              root /usr/share/nginx/html; 
              location / {
              root /root/newProject/h5newproject/dist;
              index index.html index.htm list.html MP_verify_zseh73X5od2vmgWX.txt;
              try_files $uri $uri/ /index.html; 
              }
        location /api/share/ {
            error_page 404 /404.html;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_redirect off;
            proxy_pass http://sharing;
              error_page 500 502 503 504 /50x.html;} 
      }
        upstream sharing {
          server 39.98.188.73:5011 fail_timeout=0;
      }

目录
相关文章
|
开发者 Python
如何在Python中管理模块和包的依赖关系?
在实际开发中,通常会结合多种方法来管理模块和包的依赖关系,以确保项目的顺利进行和可维护性。同时,要及时更新和解决依赖冲突等问题,以保证代码的稳定性和可靠性
726 159
|
10月前
|
异构计算 Python
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
775 1
|
11月前
|
数据处理 开发工具 开发者
requirement.txt 管理python包依赖
在 Python 项目中,`requirements.txt` 用于记录依赖库及其版本,便于环境复现。本文介绍了多种生成该文件的方法:基础方法使用 `pip freeze`,进阶方法使用 `pipreqs`,专业方法使用 `poetry` 或 `pipenv`,以及手动维护方式。每种方法适用不同场景,涵盖从简单导出到复杂依赖管理,并提供常见问题的解决方案,帮助开发者高效生成精准的依赖列表,确保项目环境一致性。
3134 4
|
10月前
|
人工智能 Shell Python
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
ERROR: pip’s dependency resolver does not currently take into 报错-Python项目依赖冲突的解决方案-优雅草优雅草卓伊凡
372 0
|
11月前
|
JavaScript 前端开发 机器人
【Azure Bot Service】在中国区Azure上部署机器人的 Python 版配置
本文介绍了在中国区Azure上使用Python SDK配置Azure Bot Service时遇到的问题及解决方案,涵盖参数设置与适配器配置,适用于希望在Azure中国区部署Python机器人的开发者。
282 9
|
人工智能 安全 Shell
Jupyter MCP服务器部署实战:AI模型与Python环境无缝集成教程
Jupyter MCP服务器基于模型上下文协议(MCP),实现大型语言模型与Jupyter环境的无缝集成。它通过标准化接口,让AI模型安全访问和操作Jupyter核心组件,如内核、文件系统和终端。本文深入解析其技术架构、功能特性及部署方法。MCP服务器解决了传统AI模型缺乏实时上下文感知的问题,支持代码执行、变量状态获取、文件管理等功能,提升编程效率。同时,严格的权限控制确保了安全性。作为智能化交互工具,Jupyter MCP为动态计算环境与AI模型之间搭建了高效桥梁。
839 2
Jupyter MCP服务器部署实战:AI模型与Python环境无缝集成教程
|
人工智能 Linux C++
即开即用,封装 Flask 项目为 exe 文件实操步骤
即开即用,封装 Flask 项目为 exe 文件实操步骤
|
存储 缓存 文件存储
uv安装python及其依赖的加速方法
国内在使用uv的时候,可能会涉及到装python的速度太慢的问题,为了解决这个问题,可以使用`UV_PYTHON_INSTALL_MIRROR`这个环境变量。除此以外,对于多人协作场景,`UV_CACHE_DIR`也是一个有用的环境变量。本文会介绍这两个变量。
8649 10
|
数据可视化 Python
如何在Python中解决模块和包的依赖冲突?
解决模块和包的依赖冲突需要综合运用多种方法,并且需要团队成员的共同努力和协作。通过合理的管理和解决冲突,可以提高项目的稳定性和可扩展性

推荐镜像

更多