修改supervisord.conf
修改最后一行:
files = /etc/supervisord.d/conf.d/*.conf
创建相应目录和文件
vim /etc/supervisord.d/conf.d/django.conf
[program:django_authentication]
directory=项目绝对路径
command = /usr/local/bin/python3 manage.py runserver 0.0.0.0:80
numprocs = 3
autostart = true
autorestart=true
启动失败自动重试次数
startretries=10
stdout_logfile = /root/data/logs/access_renz.log
stdout_logfile_maxbytes = 200MB
stdout_logfile_backups = 5
stderr_logfile = /root/data/logs/error_renz.log
stderr_logfile_maxbytes = 200MB
stderr_logfile_backups = 5