Add diun for monitoring images

This commit is contained in:
IamTheFij 2023-01-12 12:11:16 -08:00
parent 0a798aa5a7
commit 03fd68b4f7
3 changed files with 39 additions and 0 deletions

View File

@ -6,6 +6,7 @@ job "ddclient" {
task "ddclient" {
driver = "docker"
config {
image = "ghcr.io/linuxserver/ddclient:v3.10.0-ls104"

View File

@ -145,3 +145,37 @@ module "photoprism_module" {
},
]
}
module "diun" {
source = "./service"
name = "diun"
image = "crazymax/diun:4.24"
args = ["serve", "--log-level=debug"]
env = {
DIUN_DB_PATH = "$${NOMAD_TASK_DIR}/diun.db"
DIUN_WATCH_SCHEDULE = "0 */6 * * *"
DIUN_PROVIDERS_NOMAD_WATCHBYDEFAULT = true
# Nomad API
NOMAD_ADDR = "http://$${attr.unique.network.ip-address}:4646/"
DIUN_PROVIDERS_NOMAD = true
}
use_vault = true
templates = [
{
data = <<EOF
{{ with secret "kv/data/slack" -}}
DIUN_NOTIF_SLACK_WEBHOOKURL={{ .Data.data.hook_url }}
{{ end -}}
EOF
dest_prefix = "$${NOMAD_SECRETS_DIR}"
dest = "env"
env = true
mount = false
},
]
}

View File

@ -57,6 +57,10 @@ job "whoami" {
task "whoami" {
driver = "docker"
meta = {
"diun.enable" = false
}
config {
image = "containous/whoami:latest"
ports = ["web"]