From a7fd5b6a68b778b56a7228695dcdfd8989ad9ebd Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Wed, 12 Sep 2018 11:25:50 +0200 Subject: [PATCH] Configure circus --- Dockerfile | 8 +++----- files/circus.ini | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 files/circus.ini diff --git a/Dockerfile b/Dockerfile index 6204f10..b7d55e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,13 @@ ENV BACKUPPC_VERSION 4.2.1 ENV BACKUPPC_XS_VERSION 0.57 ENV RSYNC_BPC_VERSION 3.0.9.12 ENV PAR2_VERSION v0.8.0 -ENV SUPERVISOR_COMMIT_HASH abef0a2be35f4aae4a4edeceadb7a213b729ef8d -# Install backuppc runtime dependencies RUN apk --no-cache --update add python3 rsync perl perl-archive-zip perl-xml-rss perl-cgi perl-file-listing expat samba-client iputils openssh openssl rrdtool msmtp lighttpd lighttpd-mod_auth gzip apache2-utils tzdata libstdc++ libgomp shadow \ # Install backuppc build dependencies && apk --no-cache --update --virtual build-dependencies add gcc g++ libgcc autoconf automake make git patch perl-dev expat-dev curl wget \ # Install supervisor && python3 -m ensurepip \ - && pip3 install --upgrade pip git+https://github.com/Supervisor/supervisor@$SUPERVISOR_COMMIT_HASH \ + && pip3 install --upgrade pip circus \ # 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 \ @@ -43,7 +41,7 @@ RUN apk --no-cache --update add python3 rsync perl perl-archive-zip perl-xml-rss COPY files/lighttpd.conf /etc/lighttpd/lighttpd.conf COPY files/entrypoint.sh /entrypoint.sh -COPY files/supervisord.conf /etc/supervisord.conf +COPY files/circus.ini /etc/circus.ini EXPOSE 8080 @@ -51,4 +49,4 @@ VOLUME ["/etc/backuppc", "/home/backuppc", "/data/backuppc"] ENTRYPOINT ["/entrypoint.sh"] -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] +CMD ["/usr/bin/circusd", "/etc/circus.ini"] diff --git a/files/circus.ini b/files/circus.ini new file mode 100644 index 0000000..6317303 --- /dev/null +++ b/files/circus.ini @@ -0,0 +1,15 @@ +[circus] +endpoint = ipc:///var/circus/endpoint +pubsub_endpoint = ipc:///var/circus/pubsub +statsd = False +httpd = False + +[watcher:lighttpd] +cmd = /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -D +stdout_stream.class = FancyStdoutStream +stderr_stream.class = FancyStdoutStream + +[watcher:backuppc] +cmd = /usr/local/BackupPC/bin/BackupPC +stdout_stream.class = FancyStdoutStream +stderr_stream.class = FancyStdoutStream \ No newline at end of file