fix deploy issues
- make supervisorctl happy - fix avatar path - refine logging config - add nginx buffer path
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
location /public {
|
||||
root /app/data;
|
||||
root /data;
|
||||
}
|
||||
|
||||
location /api {
|
||||
|
||||
@@ -20,6 +20,7 @@ http {
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_types application/javascript text/css;
|
||||
client_body_temp_path /tmp 1 2;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
|
||||
@@ -29,4 +29,4 @@ do
|
||||
done
|
||||
|
||||
chown -R nobody:nogroup $DATA $APP/dist
|
||||
exec supervisord -c /app/deploy/supervisor.conf
|
||||
exec supervisord -c /app/deploy/supervisord.conf
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
[supervisord]
|
||||
logfile=/app/data/log/supervisord.log
|
||||
logfile=/data/log/supervisord.log
|
||||
logfile_maxbytes=10MB
|
||||
logfile_backups=10
|
||||
loglevel=info
|
||||
pidfile=/tmp/supervisord.pid
|
||||
nodaemon=true
|
||||
childlogdir=/app/data/log/
|
||||
childlogdir=/data/log/
|
||||
|
||||
[inet_http_server]
|
||||
port=127.0.0.1:9005
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///tmp/supervisor.sock
|
||||
serverurl=http://127.0.0.1:9005
|
||||
|
||||
[program:nginx]
|
||||
command=nginx -c /app/deploy/nginx/nginx.conf
|
||||
directory=/app/
|
||||
stdout_logfile=/app/data/log/nginx.log
|
||||
stderr_logfile=/app/data/log/nginx.log
|
||||
stdout_logfile=/data/log/nginx.log
|
||||
stderr_logfile=/data/log/nginx.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
@@ -25,8 +31,8 @@ killasgroup=true
|
||||
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
|
||||
stdout_logfile=/data/log/gunicorn.log
|
||||
stderr_logfile=/data/log/gunicorn.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
@@ -37,8 +43,8 @@ killasgroup=true
|
||||
command=celery -A oj worker -l warning
|
||||
directory=/app/
|
||||
user=nobody
|
||||
stdout_logfile=/app/data/log/celery.log
|
||||
stderr_logfile=/app/data/log/celery.log
|
||||
stdout_logfile=/data/log/celery.log
|
||||
stderr_logfile=/data/log/celery.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
Reference in New Issue
Block a user