Switch back to supervisor

This commit is contained in:
Adrien Ferrand 2020-03-01 15:57:35 +01:00
parent 9b81f750a3
commit 2a6d3e2b46
3 changed files with 43 additions and 4 deletions

View File

@ -11,10 +11,10 @@ ENV PAR2_VERSION v0.8.1
RUN apk --no-cache --update add python3 rsync bash perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing expat samba-client iputils openssh openssl rrdtool ttf-dejavu msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp shadow ca-certificates \ RUN apk --no-cache --update add python3 rsync bash perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing expat samba-client iputils openssh openssl rrdtool ttf-dejavu msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp shadow ca-certificates \
# Install backuppc build dependencies # Install backuppc build dependencies
&& apk --no-cache --update --virtual build-dependencies add gcc g++ libgcc linux-headers autoconf automake make git patch perl-dev python3-dev expat-dev acl-dev attr-dev popt-dev curl wget \ && apk --no-cache --update --virtual build-dependencies add gcc g++ libgcc linux-headers autoconf automake make git patch perl-dev python3-dev expat-dev acl-dev attr-dev popt-dev curl wget \
# Install circusd (version 0.15.0 since 0.16.x appears to consume 100% of a CPU) # Install supervisor
&& python3 -m venv /srv/venv \ && python3 -m venv /srv/venv \
&& /srv/venv/bin/pip install --upgrade pip wheel \ && /srv/venv/bin/pip install --upgrade pip wheel \
&& /srv/venv/bin/pip install --upgrade pip circus==0.15.0 \ && /srv/venv/bin/pip install --upgrade pip supervisor==4.1.0 \
# Compile and install BackupPC:XS # Compile and install BackupPC:XS
&& git clone https://github.com/backuppc/backuppc-xs.git /root/backuppc-xs --branch $BACKUPPC_XS_VERSION \ && git clone https://github.com/backuppc/backuppc-xs.git /root/backuppc-xs --branch $BACKUPPC_XS_VERSION \
&& cd /root/backuppc-xs \ && cd /root/backuppc-xs \
@ -44,7 +44,7 @@ RUN apk --no-cache --update add python3 rsync bash perl perl-archive-zip perl-xm
COPY files/lighttpd.conf /etc/lighttpd/lighttpd.conf COPY files/lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY files/entrypoint.sh /entrypoint.sh COPY files/entrypoint.sh /entrypoint.sh
COPY files/run.sh /run.sh COPY files/run.sh /run.sh
COPY files/circus.ini /etc/circus.ini COPY files/supervisord.conf /etc/supervisord.conf
EXPOSE 8080 EXPOSE 8080
@ -54,4 +54,4 @@ VOLUME ["/etc/backuppc", "/home/backuppc", "/data/backuppc"]
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
CMD ["/run.sh"] CMD ["/srv/venv/bin/supervisord", "-c", "/etc/supervisord.conf"]

38
files/supervisord.conf Normal file
View File

@ -0,0 +1,38 @@
[unix_http_server]
file = /tmp/supervisor.sock
username = dummy
password = dummy
[supervisord]
user = root
logfile = /var/log/supervisord.log
logfile_maxbytes = 50MB
logfile_backups = 10
loglevel = info
pidfile = /tmp/supervisord.pid
nodaemon = true
minfds = 1024
minprocs = 200
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl = unix:///tmp/supervisor.sock
username = dummy
password = dummy
[program:lighttpd]
command = /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D
redirect_stderr = true
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes = 0
stopasgroup = true
killasgroup = true
[program:backuppc]
command = /usr/local/BackupPC/bin/BackupPC
redirect_stderr = true
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes = 0
user = %(ENV_BACKUPPC_USERNAME)s

@ -0,0 +1 @@
Subproject commit f4c613cee6fec298ffb1e9e773a9fec76346e7eb