p.s: 项目放在了/home/alps/mysite下面,部署环境是ubuntu16.04
这是报错信息
$ sudo supervisorctl -c /etc/supervisord.conf restart all
mysite: ERROR (no such file)
配置文件/etc/supervisord.conf如下
[program:mysite]
command=uwsgi --ini /home/alps/mysite/uwsgi.ini
directory=/home/alps/mysite
startsecs=0
stopwaitsecs=0
autostart=true
autorestart=true
配置文件/home/alps/mysite/uwsgi.ini如下
/home/alps/uwsgaa[uwsgi]
socket = /tmp/mysite.sock
chdir=/home/alps/mysite/
wsgi-file = mysite/wsgi.py
touch-reload=/home/alps/myiste/reload
processes = 2
threads = 4
chmod-socket = 664
chown-socket=alps:www-data
执行下面两条命令的时候都正常,没有报错信息。
$ uwsgi --http :8001 --chdir /home/alps/mysite --module mysite.wsgi
$ supervisord -c /etc/supervisord.conf
新手第一次学习django部署,希望高手多多指教。
迷茫2017-04-18 09:44:45
Can you post the complete configuration of your supervisord.conf? Judging from your current configuration, there is a section missing about the configuration of supervisord server and supervisorctl.
I’ll post a paragraph for you as a reference:
[unix_http_server]
file = /opt/test/run/supervisord.sock
[rpcinterface:supervisor]
; This section is always necessary because supervisor uses RPC internally.
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
; Must match settings in 'unix_http_server'
serverurl = unix:////opt/test/run/supervisord.sock