Browse Source

init

master
Simon Vieille 2 weeks ago
commit
8e39b18f5d
3 changed files with 36 additions and 0 deletions
  1. +18
    -0
      Dockerfile
  2. +9
    -0
      docker-compose.yml
  3. +9
    -0
      supervisord.conf

+ 18
- 0
Dockerfile View File

@ -0,0 +1,18 @@
FROM debian:stretch
RUN apt-get update && apt-get -y install mailgraph lighttpd supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN lighttpd-enable-mod cgi \
&& mkdir /tmp/rrd \
&& chmod 777 /tmp/rrd \
&& mkdir -p /var/www/html/cgi-bin/ \
&& ln -s /usr/share/mailgraph/mailgraph.cgi /var/www/html/cgi-bin/mailgraph.cgi \
&& sed -i 's|/var/lib/mailgraph|/tmp/rrd|g' /usr/share/mailgraph/mailgraph.cgi
VOLUME ["/tmp/mail.log", "/tmp/rrd"]
CMD ["/usr/bin/supervisord"]
EXPOSE 80

+ 9
- 0
docker-compose.yml View File

@ -0,0 +1,9 @@
version: "3.9"
services:
mailgraph:
build: .
volumes:
- /var/log/mail.log:/tmp/mail.log
- ./rrd/:/tmp/rdd
ports:
- 80:80

+ 9
- 0
supervisord.conf View File

@ -0,0 +1,9 @@
[supervisord]
nodaemon=true
[program:mailgraph]
directory=/tmp/rrd/
command=/usr/sbin/mailgraph --rbl-is-spam -l /tmp/mail.log --ignore-localhost
[program:lighttpd]
command=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

Loading…
Cancel
Save