OnlineJudge/deploy/supervisor.conf
2017-10-24 21:14:29 +08:00

35 lines
758 B
Plaintext

[supervisord]
logfile=/app/log/supervisord.log
logfile_maxbytes=10MB
logfile_backups=10
loglevel=info
pidfile=/tmp/supervisord.pid
nodaemon=true
childlogdir=/data/log/
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[program:gunicorn]
command=sh -c "gunicorn oj.wsgi --user nobody -b 0.0.0.0:8080 --reload -w `grep -c ^processor /proc/cpuinfo`"
directory=/app/
stdout_logfile=/data/log/gunicorn.log
stderr_logfile=/data/log/gunicorn.log
autostart=true
autorestart=true
startsecs=5
stopwaitsecs = 5
killasgroup=true
[program:celery]
command=celery -A oj worker -l warning
directory=/app/
user=nobody
stdout_logfile=/data/log/celery.log
stderr_logfile=/data/log/celery.log
autostart=true
autorestart=true
startsecs=5
stopwaitsecs = 5
killasgroup=true