diff --git a/docker/diun/compose.yaml b/docker/diun/compose.yaml index da41aa4..01188e6 100644 --- a/docker/diun/compose.yaml +++ b/docker/diun/compose.yaml @@ -11,6 +11,7 @@ services: volumes: - "./data:/data" - "./diun.yml:/diun.yml:ro" + - "./diun.list.yml:/diun.list.yml:ro" - "/var/run/docker.sock:/var/run/docker.sock" environment: - "TZ=America/New_York" diff --git a/docker/diun/diun.list.yml b/docker/diun/diun.list.yml new file mode 100644 index 0000000..68fb0c8 --- /dev/null +++ b/docker/diun/diun.list.yml @@ -0,0 +1,9 @@ +# Base images for locally-built containers. The docker provider doesn't see +# these because the built image has a local-only tag. ctn_names metadata is set +# so the email subject still points at the compose dir that needs rebuilding. +- name: nextcloud:latest + metadata: + ctn_names: nextcloud-base +- name: githubyumao/mcsmanager-daemon:latest + metadata: + ctn_names: mcsmanager-daemon-base diff --git a/docker/diun/diun.yml b/docker/diun/diun.yml index 084b04a..2fdc586 100644 --- a/docker/diun/diun.yml +++ b/docker/diun/diun.yml @@ -8,6 +8,11 @@ providers: docker: watchByDefault: true # watch every running container without needing labels watchStopped: false + file: + # Explicit watches for base images of locally-built containers (apps with a + # Dockerfile in their compose dir). The docker provider can't see these + # because the built image has a local-only tag with no registry digest. + filename: /diun.list.yml notif: mail: @@ -19,4 +24,13 @@ notif: from: argento@fastmail.com to: - timothykim@fastmail.fm + # Subject leads with container name so the compose dir is obvious from the inbox + # (e.g. "nextcloud-redis" -> docker/nextcloud/). Default template uses the full + # canonical ref with @sha256 digest, which is unreadable. + templateTitle: '[{{ .Entry.Status }}] {{ .Entry.Metadata.ctn_names }} ({{ .Entry.Image.Path }}:{{ .Entry.Image.Tag }})' + templateBody: | + Container: {{ .Entry.Metadata.ctn_names }} + Image: {{ .Entry.Image.Path }}:{{ .Entry.Image.Tag }} + {{ if .Entry.Image.HubLink }}Link: {{ .Entry.Image.HubLink }}{{ end }} + Host: {{ .Meta.Hostname }}