1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00

webkit: add volume

This commit is contained in:
kev 2014-12-25 19:34:44 +08:00
parent 5f1ac22d44
commit 0e2d468887
3 changed files with 33 additions and 12 deletions

View File

@ -6,7 +6,7 @@ FROM ubuntu:14.04
MAINTAINER kev MAINTAINER kev
RUN apt-get update && apt-get install -y supervisor haproxy libfontconfig1 libfreetype6 RUN apt-get update && apt-get install -y supervisor haproxy libfontconfig1 libfreetype6
RUN mkdir -p /webkit/includes/ /etc/supervisor/conf.d/ /etc/monit/conf.d/ /var/lib/monit/events/ RUN mkdir -p /data/ /webkit/includes/ /etc/supervisor/conf.d/ /etc/monit/conf.d/ /var/lib/monit/events/
ADD ./*.js /webkit/ ADD ./*.js /webkit/
ADD ./includes/ /webkit/includes/ ADD ./includes/ /webkit/includes/
@ -19,6 +19,7 @@ ADD ./monit/conf.d/ /etc/monit/conf.d/
RUN chmod 600 /etc/monit/monitrc RUN chmod 600 /etc/monit/monitrc
VOLUME /data/
EXPOSE 1024 2812 9001 EXPOSE 1024 2812 9001
CMD /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf CMD /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf

View File

@ -189,7 +189,7 @@ function urlopen(req, callback) {
case 'png': case 'png':
case 'gif': case 'gif':
//TODO: setup a fileserver //TODO: setup a fileserver
data = '/tmp/' + req.requestId; data = '/data/' + req.requestId;
page.render(data, {format: req.requestType}); page.render(data, {format: req.requestType});
break; break;
case 'script': case 'script':

View File

@ -1,40 +1,60 @@
check process webkit-8080 with pidfile /var/run/webkit-8080.pid check process webkit-8080 with pidfile /var/run/webkit-8080.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8080" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8080"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8081 with pidfile /var/run/webkit-8081.pid check process webkit-8081 with pidfile /var/run/webkit-8081.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8081" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8081"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8082 with pidfile /var/run/webkit-8082.pid check process webkit-8082 with pidfile /var/run/webkit-8082.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8082" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8082"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8083 with pidfile /var/run/webkit-8083.pid check process webkit-8083 with pidfile /var/run/webkit-8083.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8083" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8083"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8084 with pidfile /var/run/webkit-8084.pid check process webkit-8084 with pidfile /var/run/webkit-8084.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8084" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8084"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8085 with pidfile /var/run/webkit-8085.pid check process webkit-8085 with pidfile /var/run/webkit-8085.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8085" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8085"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8086 with pidfile /var/run/webkit-8086.pid check process webkit-8086 with pidfile /var/run/webkit-8086.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8086" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8086"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8087 with pidfile /var/run/webkit-8087.pid check process webkit-8087 with pidfile /var/run/webkit-8087.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8087" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8087"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8088 with pidfile /var/run/webkit-8088.pid check process webkit-8088 with pidfile /var/run/webkit-8088.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8088" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8088"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert
check process webkit-8089 with pidfile /var/run/webkit-8089.pid check process webkit-8089 with pidfile /var/run/webkit-8089.pid
restart program = "/usr/bin/supervisorctl restart webkit:webkit-8089" restart program = "/usr/bin/supervisorctl restart webkit:webkit-8089"
if uptime > 10 minutes then restart if uptime > 1 hour then restart
if total memory > 100 MB for 5 cycles then restart
if total cpu > 10% for 5 cycles then alert