Skip to content

genomez/dockwatch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Watcher

Purpose

Simple UI driven way to manage updates & notifications for containers. As this is meant to be simple, there is no db container required or setup. This will save things it needs to files in the /config mount instead.

Notification triggers

  • Notify when a container is added
  • Notify when a container is removed
  • Notify when a container changes state (running -> stopped)
  • Nofity when an update is available
  • Notify when an update is applied
  • Notify when images/volumes have been pruned
  • Notify if memory is > n%
  • Notify if CPU is > n%

Notification platforms

  • Notifiarr

Update options

  • Ignore
  • Auto update
  • Check for update

Features

  • Setup update schedules on a container by container basis
  • Setup notify only or update on a container by container basis
  • Mass prune/remove orphan images and volumes
  • Mass select containers and generate docker run commands
  • Mass select containers and generate a docker-compose for them
  • Mass select containers and start/restart/stop/pull/update
  • Memcached support (optional)

Permissions

No matter how docker is installed (native, unraid, etc), it is required that the user running the container has permission to use the docker commands. View root/app/www/public/functions/docker.php to see what is used

Unraid: This is built into the container with

addgroup -g 281 unraiddocker && \
usermod -aG unraiddocker abc

Ubuntu: This is an example to get the group id to use

grep docker /etc/group

Run

This is an unraid example, adjust paths and settings for your setup

docker run \
  -d \
  --name='dockwatch' \
  --net='custom-bridge' \
  -e TZ="America/New_York" \
  -e HOST_OS="Unraid" \
  -e 'PUID'='1001' \
  -e 'PGID'='999' \
  -e 'UMASK'='022' \
  -l net.unraid.docker.managed=dockerman \
  -l net.unraid.docker.webui='http://[IP]:[PORT:9999]' \
  -l net.unraid.docker.icon='https://golift.io/crontabs.png' \
  -p '9999:80/tcp' \
  -v '/mnt/disk1/appdata/dockwatch/config':'/config':'rw' \
  -v '/proc':'/proc':'rw' \
  -v '/var/run/docker.sock':'/var/run/docker.sock':'rw' 'ghcr.io/notifiarr/dockwatch:main'

Compose

This is an example, adjust paths and settings for your setup

dockwatch:
	container_name: dockwatch
	image: ghcr.io/notifiarr/dockwatch:main
	ports:
	  - 9999:80/tcp
	environment:
	  - PUID=1000
	  - PGID=999
	  - UMASK=022
	  - TZ=Etc/UTC
	volumes:
	  - /appdata/dockwatch/config:/config
	  - /var/run/docker.sock:/var/run/docker.sock
	  - /proc:/proc

Manual

docker pull ghcr.io/notifiarr/dockwatch:main

ENV

These are my settings, adjust them to fit your setup!!

Volumes

Name Host Container
App Config /mnt/disk1/appdata/dockwatch/config /config
Proc /proc /proc
Docker sock /var/run/docker.sock /var/run/docker.sock

Ports

Inside Outside
80 9999

Variables

Name Key Value
PUID PUID 1001
PGID PGID 100
UMASK UMASK 022

Login

There is support for a simple login mechanism but i would recomment using something like a reverse proxy with authentication

  • Add a file logins to /config
  • Add admin:password to the file and save it
  • Reload
  • Multiple logins, drop a line and add another admin:password

Development

Firstly i am not a docker expert so there are likely other/better ways to do this. What i list below is just how i work on it without having to rebuild the container for every change and a reminder for me on what i did. Since this involves messing with the contents of the container, if an update is applied these steps will need re-applied

Option 1:

  • Fork the repo
  • Open the Dockerfile and comment out the COPY root/ / line at the bottom
  • Copy the files from root/app/www/public/* to /config/www/*
  • Copy the cron feom root/etc/crontabs/abc to /config/crontabs/abc (You'll need to add an ENV variable for DOCKER_MODS=linuxserver/mods:universal-cron)
  • Copy the ini from root/etc/php82/conf.d/dockwatch.ini to /config/php/php-local.ini
  • This should allow you to run the container while making changes to the files in /config and when done, just copy the files back into the root/ directories and push your fork so it builds a new container

Option 2:

  • SSH into the container as root
  • Run chown -R abc:abc /app/www
  • Open the UI to Settings -> Development and change the environment from Internal to External & save
  • Restart the container and it is now looking at /config/www for the working files so make sure you copy the files to there!

Icons

Unraid:

  • Icons show up automatically using unraid labels

Non-Unraid:

Screenshots

UI

image image image image image image image

Notifications

image image image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SCSS 56.3%
  • PHP 35.8%
  • JavaScript 4.7%
  • CSS 1.3%
  • Smarty 1.2%
  • Dockerfile 0.7%