commit 993ec547d1879f3a243dede846b61253b1a374e1 Author: Kevin Alberts Date: Sun Mar 16 10:55:51 2025 +0100 Initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..5c3e6c7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,17 @@ +--- +kind: pipeline +type: docker +name: default + +steps: +- name: build + image: plugins/docker + settings: + registry: git.kurocon.nl + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: git.kurocon.nl/kuronet/munin-docker + tags: + - latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5e2e6eb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM debian:12 + +LABEL org.opencontainers.image.authors="me@kurocon.nl" +LABEL org.opencontainers.image.source="https://git.kurocon.nl/KuroNET/munin-docker" +LABEL org.opencontainers.image.description="Munin image with Docker binaries" + +RUN apt-get update -qq && RUNLEVEL=1 DEBIAN_FRONTEND=noninteractive \ + apt-get install -y -qq cron munin nginx wget libcgi-fast-perl curl && \ + mkdir -p /var/run/munin && chown -R munin:munin /var/run/munin && \ + echo "includedir /etc/munin/munin-conf.d" > /etc/munin/munin.conf + +VOLUME /var/lib/munin +VOLUME /var/log/munin +VOLUME /var/run/munin +VOLUME /var/cache/munin +VOLUME /etc/munin/munin.conf.d + +EXPOSE 80 + +CMD ["/usr/sbin/munin-node"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..9cf37cb --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# Munin (master) + +## Quickstart + +Munin stats aggregator and reporting, based on ethersys' munin container (). +Base image: Debian 12 + +### Build + +```bash +git clone https://git.kurocon.nl/KuroNET/munin-docker.git +docker build -t munin ./ +docker run munin +``` + +### Or pull + +```bash +docker pull git.kurocon.nl/kuronet/munin-docker +docker run git.kurocon.nl/kuronet/munin-docker:latest +``` + +## How it works + +### Ports + +* None + +### Volumes + +* `/var/lib/munin` : Databases files +* `/var/log/munin` : Logs +* `/var/run/munin` : Access to graph CGI socket +* `/var/cache/munin` : Where are generated graphs +* `/etc/munin/munin.conf.d` : Access to node configurations + +### Environment Variables + +* `TZ`: Customize the timezone according to your place: (i.e. `Europe/London`) (default: `Europe/Paris`) + +### Note + +Cronjobs and webserver should be setup separately (i.e. Kubernetes CronJob + sidecar nginx container) + +## Persistent example + +```bash +docker run \ + -d \ + --name=munin \ + -e TZ="Europe/London" \ + -v /data/munin/db:/var/lib/munin \ + -v /data/munin/logs:/var/log/munin \ + -v /data/munin/cache:/var/cache/munin \ + munin +```