去除supervisor

This commit is contained in:
virusdefender 2016-10-03 17:30:58 +08:00
parent 8bb2a66f7b
commit fe115969b0
2 changed files with 4 additions and 24 deletions

View File

@ -14,9 +14,9 @@ RUN mkdir /var/wp
RUN pip install psutil gunicorn web.py requests
RUN mkdir -p /judger_run /test_case /log /code
COPY deploy/java_policy /etc
COPY deploy/supervisord.conf /etc
RUN chmod -R 777 /judger_run
RUN pip install supervisor psutil gunicorn web.py
EXPOSE 8080
RUN pip install futures psutil gunicorn web.py
HEALTHCHECK --interval=5s --retries=3 CMD python /code/service.py
CMD exec supervisord
WORKDIR /code
EXPOSE 8080
CMD gunicorn --workers 4 --threads 4 --error-logfile /log/gunicorn.log --bind 0.0.0.0:8080 server:wsgiapp

View File

@ -1,20 +0,0 @@
[supervisord]
logfile=/log/judger_supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/log/judger_supervisord.pid
nodaemon=true
childlogdir=/log/
[program:judger_server]
command=gunicorn -w 4 -b 0.0.0.0:8080 server:wsgiapp
directory=/code
numprocs=1
stdout_logfile=/log/judger_server.log
stderr_logfile=/log/judger_server.log
autostart=true
autorestart=true
startsecs=5
stopwaitsecs = 5
killasgroup=true