update dockerfile and settings

This commit is contained in:
zema1
2017-10-24 21:14:29 +08:00
parent e8841eae82
commit b694000ab9
9 changed files with 19 additions and 137 deletions

View File

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