pythonGunicorn是什么

美女程序员鼓励师

1、说明

gunicorn是运行在Unix下面的PythonWSGIHTTPserver,使用pre-forkworker模型(注意,Arbiter是gunicorn的master,所以称gunicorn为pre-forkworker)。

可以使用各种选项来配置gunicorn。将-reload传输到gunicorn命令中,或者将reload写到配置文件中,这样gunicorn就能在有文件改变的时候自动重启python服务。

2、实例

FROM python:3.6

 

# 创建 app 目录

WORKDIR /app

 

# 安装 app 依赖

COPY gunicorn_app/requirements.txt ./

 

RUN pip install -r requirements.txt

 

# 打包 app 源码

COPY gunicorn_app /app

 

EXPOSE 8080

以上就是python Gunicorn的介绍,希望对大家有所帮助。更多Python学习指路:python基础教程

本文教程操作环境:windows7系统、Python 3.9.1,DELL G3电脑。

以上是 pythonGunicorn是什么 的全部内容, 来源链接: utcz.com/z/543926.html

回到顶部