#!/bin/bash echo "**** Building latest monitoring container ****" $(pwd)/build.sh echo "**** Loading secrets.sh ****" source ./secrets.sh echo "**** Deleting existing container ****" sudo docker rm -f containerized-monitoring echo "**** Running monitoring ****" sudo docker run -itd \ --restart unless-stopped \ --network services \ --name containerized-monitoring \ -e TZ=UTC \ -e DEBUG=1 \ -e CONFIG_NOTIFY_EMAIL=$CONFIG_NOTIFY_EMAIL \ -e CONFIG_NOTIFY_SMTP_SERVER=$CONFIG_NOTIFY_SMTP_SERVER \ -e CONFIG_NOTIFY_SMTP_USER=$CONFIG_NOTIFY_SMTP_USER \ -e CONFIG_NOTIFY_SMTP_PASS=$CONFIG_NOTIFY_SMTP_PASS \ -e CONFIG_MONIT_USER=$CONFIG_MONIT_USER \ -e CONFIG_MONIT_PASS=$CONFIG_MONIT_PASS \ -p 2812:2812/tcp \ -p 2813:2813/tcp \ -p 80:80/tcp \ -l diun.enable=true \ -l traefik.enable=false \ -v /var/containerized-monitoring/monit:/opt/monit \ -v /var/containerized-monitoring/munin:/opt/munin \ --mount type=tmpfs,destination=/opt/munin/www \ --mount type=tmpfs,destination=/opt/munin/log \ --mount type=tmpfs,destination=/opt/munin/run \ --mount type=tmpfs,destination=/opt/munin/cgi-tmp \ containerized-monitoring:latest docker logs -f --since=1m containerized-monitoring