mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-09-21 08:23:20 +00:00
Accept Merge Request #247 使用 supervisord 启动 docker 内进程 : (virusdefender-dev -> dev)
Merge Request: 使用 supervisord 启动 docker 内进程 Created By: @virusdefender Accepted By: @virusdefender URL: https://coding.net/u/virusdefender/p/qduoj/git/merge/247
This commit is contained in:
commit
098011c48f
@ -5,3 +5,4 @@ WORKDIR /code
|
||||
ADD requirements.txt /code/
|
||||
RUN pip install -r requirements.txt
|
||||
EXPOSE 8010
|
||||
CMD supervisord
|
16
dockerfiles/oj_web_server/gunicorn.conf
Normal file
16
dockerfiles/oj_web_server/gunicorn.conf
Normal file
@ -0,0 +1,16 @@
|
||||
[program:gunicorn]
|
||||
|
||||
command=gunicorn oj.wsgi:application -b 0.0.0.0:8080 --reload
|
||||
|
||||
directory=/code/
|
||||
user=root
|
||||
numprocs=1
|
||||
stdout_logfile=/code/log/gunicorn.log
|
||||
stderr_logfile=/code/log/gunicorn.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
|
||||
stopwaitsecs = 6
|
||||
|
||||
killasgroup=true
|
16
dockerfiles/oj_web_server/mq.conf
Normal file
16
dockerfiles/oj_web_server/mq.conf
Normal file
@ -0,0 +1,16 @@
|
||||
[program:mq]
|
||||
|
||||
command=python manage.py runscript mq
|
||||
|
||||
directory=/code/qduoj/
|
||||
user=root
|
||||
numprocs=1
|
||||
stdout_logfile=/code/log/mq.log
|
||||
stderr_logfile=/code/log/mq.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
|
||||
stopwaitsecs = 6
|
||||
|
||||
killasgroup=true
|
26
dockerfiles/oj_web_server/supervisord.conf
Normal file
26
dockerfiles/oj_web_server/supervisord.conf
Normal file
@ -0,0 +1,26 @@
|
||||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock ; path to your socket file
|
||||
|
||||
[supervisord]
|
||||
logfile=/code/log/supervisord.log ; supervisord log file
|
||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||
logfile_backups=10 ; number of backed up logfiles
|
||||
loglevel=info ; info, debug, warn, trace
|
||||
pidfile=/code/log/supervisord.pid ; pidfile location
|
||||
nodaemon=true ; run supervisord as a daemon
|
||||
minfds=1024 ; number of startup file descriptors
|
||||
minprocs=200 ; number of process descriptors
|
||||
user=root ; default user
|
||||
childlogdir=/code/log/ ; where child log files will live
|
||||
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///tmp/supervisor.sock ; use unix:// schem for a unix sockets.
|
||||
|
||||
|
||||
[include]
|
||||
|
||||
files=gunicorn.conf mq.conf
|
15
tools/celeryd.conf
Normal file
15
tools/celeryd.conf
Normal file
@ -0,0 +1,15 @@
|
||||
[program:celery]
|
||||
command=celery worker -A judge.judger_controller --loglevel=DEBUG
|
||||
|
||||
directory=/root/qduoj/
|
||||
user=root
|
||||
numprocs=1
|
||||
stdout_logfile=/root/log/celery_worker.log
|
||||
stderr_logfile=/root/log/celery_worker.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
|
||||
stopwaitsecs = 6
|
||||
|
||||
killasgroup=true
|
26
tools/supervisord.conf
Normal file
26
tools/supervisord.conf
Normal file
@ -0,0 +1,26 @@
|
||||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock ; path to your socket file
|
||||
|
||||
[supervisord]
|
||||
logfile=/root/log/supervisord.log ; supervisord log file
|
||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||
logfile_backups=10 ; number of backed up logfiles
|
||||
loglevel=info ; info, debug, warn, trace
|
||||
pidfile=/root/log/supervisord.pid ; pidfile location
|
||||
nodaemon=false ; run supervisord as a daemon
|
||||
minfds=1024 ; number of startup file descriptors
|
||||
minprocs=200 ; number of process descriptors
|
||||
user=root ; default user
|
||||
childlogdir=/root/log/ ; where child log files will live
|
||||
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///tmp/supervisor.sock ; use unix:// schem for a unix sockets.
|
||||
|
||||
|
||||
[include]
|
||||
|
||||
files=*.conf
|
Loading…
Reference in New Issue
Block a user