From 2a6d3e2b46a9ca9bedd3dda5389d512838ed2af9 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Sun, 1 Mar 2020 15:57:35 +0100 Subject: [PATCH] Switch back to supervisor --- Dockerfile | 8 ++++---- files/supervisord.conf | 38 +++++++++++++++++++++++++++++++++++ velero-annotations-controller | 1 + 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 files/supervisord.conf create mode 160000 velero-annotations-controller diff --git a/Dockerfile b/Dockerfile index c291346..5c2e8d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ # 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 \ -# Install circusd (version 0.15.0 since 0.16.x appears to consume 100% of a CPU) +# Install supervisor && python3 -m venv /srv/venv \ && /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 && git clone https://github.com/backuppc/backuppc-xs.git /root/backuppc-xs --branch $BACKUPPC_XS_VERSION \ && 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/entrypoint.sh /entrypoint.sh COPY files/run.sh /run.sh -COPY files/circus.ini /etc/circus.ini +COPY files/supervisord.conf /etc/supervisord.conf EXPOSE 8080 @@ -54,4 +54,4 @@ VOLUME ["/etc/backuppc", "/home/backuppc", "/data/backuppc"] ENTRYPOINT ["/entrypoint.sh"] -CMD ["/run.sh"] +CMD ["/srv/venv/bin/supervisord", "-c", "/etc/supervisord.conf"] diff --git a/files/supervisord.conf b/files/supervisord.conf new file mode 100644 index 0000000..e4ca1ef --- /dev/null +++ b/files/supervisord.conf @@ -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 diff --git a/velero-annotations-controller b/velero-annotations-controller new file mode 160000 index 0000000..f4c613c --- /dev/null +++ b/velero-annotations-controller @@ -0,0 +1 @@ +Subproject commit f4c613cee6fec298ffb1e9e773a9fec76346e7eb