deploy script

This commit is contained in:
virusdefender
2017-11-25 03:37:40 +08:00
parent 2d038c7bcc
commit 6d08011e2d
13 changed files with 127 additions and 76 deletions

View File

@@ -1,20 +1,32 @@
[supervisord]
logfile=/app/log/supervisord.log
logfile=/app/data/log/supervisord.log
logfile_maxbytes=10MB
logfile_backups=10
loglevel=info
pidfile=/tmp/supervisord.pid
nodaemon=true
childlogdir=/data/log/
childlogdir=/app/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`"
[program:nginx]
command=nginx -c /app/deploy/oj.conf
directory=/app/
stdout_logfile=/data/log/gunicorn.log
stderr_logfile=/data/log/gunicorn.log
stdout_logfile=/app/data/log/nginx.log
stderr_logfile=/app/data/log/nginx.log
autostart=true
autorestart=true
startsecs=5
stopwaitsecs = 5
killasgroup=true
[program:gunicorn]
command=sh -c "gunicorn oj.wsgi --user nobody -b 127.0.0.1:8080 --reload -w `grep -c ^processor /proc/cpuinfo`"
directory=/app/
user=nobody
stdout_logfile=/app/data/log/gunicorn.log
stderr_logfile=/app/data/log/gunicorn.log
autostart=true
autorestart=true
startsecs=5
@@ -25,8 +37,8 @@ killasgroup=true
command=celery -A oj worker -l warning
directory=/app/
user=nobody
stdout_logfile=/data/log/celery.log
stderr_logfile=/data/log/celery.log
stdout_logfile=/app/data/log/celery.log
stderr_logfile=/app/data/log/celery.log
autostart=true
autorestart=true
startsecs=5