Dal*_*Sec 5 gunicorn salt-stack
我正在使用 django 和 nginx 运行 Gunicorn 并使用 salt 进行部署。
我想更改gunicorn的过程名称,所以我用python制作了一个配置文件
gunicorn_config.py
bind = ...
workers = ...
proc_name = 'Name'
daemon = True
...
Run Code Online (Sandbox Code Playgroud)
在盐状态文件中,
gunicorn_config_file:
file.managed:
- name: /etc/gunicorn_config.py
- source: salt://.../files/gunicorn_config.py
- template: jinja
Run Code Online (Sandbox Code Playgroud)
并运行它
start_gunicorn:
cmd.run:
- name: '{{venv}}/gunicorn -c /etc/gunicorn_conig.py myProject.wsgi'
- cwd: /path/to/django/project
Run Code Online (Sandbox Code Playgroud)
minion返回全部成功,但gunicorn的进程名称仍然是
gunicorn: master并且gunicorn: worker
其他配置(例如工人)运行良好,但 proc_name 则不然。如何正确更改 proc_name?我setproctitle也在 venv 中用 pip 安装了。
谢谢。
| 归档时间: |
|
| 查看次数: |
711 次 |
| 最近记录: |