2017-10-23 10:47:26 +08:00
|
|
|
[supervisord]
|
2017-11-26 10:40:56 +08:00
|
|
|
logfile=/data/log/supervisord.log
|
2017-10-23 10:47:26 +08:00
|
|
|
logfile_maxbytes=10MB
|
|
|
|
logfile_backups=10
|
|
|
|
loglevel=info
|
|
|
|
pidfile=/tmp/supervisord.pid
|
|
|
|
nodaemon=true
|
2017-11-26 10:40:56 +08:00
|
|
|
childlogdir=/data/log/
|
|
|
|
|
|
|
|
[inet_http_server]
|
|
|
|
port=127.0.0.1:9005
|
|
|
|
|
|
|
|
[rpcinterface:supervisor]
|
|
|
|
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
|
2017-10-23 10:47:26 +08:00
|
|
|
|
|
|
|
[supervisorctl]
|
2017-11-26 10:40:56 +08:00
|
|
|
serverurl=http://127.0.0.1:9005
|
2017-10-23 10:47:26 +08:00
|
|
|
|
2017-11-25 03:37:40 +08:00
|
|
|
[program:nginx]
|
2017-11-25 12:30:00 +08:00
|
|
|
command=nginx -c /app/deploy/nginx/nginx.conf
|
2017-11-25 03:37:40 +08:00
|
|
|
directory=/app/
|
2017-11-26 10:40:56 +08:00
|
|
|
stdout_logfile=/data/log/nginx.log
|
|
|
|
stderr_logfile=/data/log/nginx.log
|
2017-11-25 03:37:40 +08:00
|
|
|
autostart=true
|
|
|
|
autorestart=true
|
|
|
|
startsecs=5
|
|
|
|
stopwaitsecs = 5
|
|
|
|
killasgroup=true
|
|
|
|
|
2017-10-23 10:47:26 +08:00
|
|
|
[program:gunicorn]
|
2017-11-25 03:37:40 +08:00
|
|
|
command=sh -c "gunicorn oj.wsgi --user nobody -b 127.0.0.1:8080 --reload -w `grep -c ^processor /proc/cpuinfo`"
|
2017-10-23 10:47:26 +08:00
|
|
|
directory=/app/
|
2017-11-25 03:37:40 +08:00
|
|
|
user=nobody
|
2017-11-26 10:40:56 +08:00
|
|
|
stdout_logfile=/data/log/gunicorn.log
|
|
|
|
stderr_logfile=/data/log/gunicorn.log
|
2017-10-23 10:47:26 +08:00
|
|
|
autostart=true
|
|
|
|
autorestart=true
|
|
|
|
startsecs=5
|
|
|
|
stopwaitsecs = 5
|
|
|
|
killasgroup=true
|
|
|
|
|
2017-10-23 20:59:44 +08:00
|
|
|
[program:celery]
|
2017-10-23 10:47:26 +08:00
|
|
|
command=celery -A oj worker -l warning
|
|
|
|
directory=/app/
|
|
|
|
user=nobody
|
2017-11-26 10:40:56 +08:00
|
|
|
stdout_logfile=/data/log/celery.log
|
|
|
|
stderr_logfile=/data/log/celery.log
|
2017-10-23 10:47:26 +08:00
|
|
|
autostart=true
|
|
|
|
autorestart=true
|
|
|
|
startsecs=5
|
|
|
|
stopwaitsecs = 5
|
2017-10-23 20:59:44 +08:00
|
|
|
killasgroup=true
|