2023-08-07 18:37:19 +00:00
|
|
|
module "minitor" {
|
|
|
|
source = "./service"
|
|
|
|
|
2024-02-18 15:49:16 +00:00
|
|
|
name = "minitor"
|
|
|
|
image = "iamthefij/minitor-go:1.4.1"
|
|
|
|
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
|
|
|
|
service_port = 8080
|
|
|
|
service_check = null
|
|
|
|
use_wesher = var.use_wesher
|
|
|
|
prometheus = true
|
2023-08-07 18:37:19 +00:00
|
|
|
|
2023-08-18 19:14:09 +00:00
|
|
|
env = {
|
|
|
|
TZ = "America/Los_Angeles",
|
|
|
|
}
|
|
|
|
|
2023-08-07 18:37:19 +00:00
|
|
|
templates = [
|
|
|
|
{
|
|
|
|
data = <<EOF
|
|
|
|
{{ with nomadVar "nomad/jobs/minitor" -}}
|
|
|
|
MAILGUN_API_KEY={{ .mailgun_api_key }}
|
|
|
|
{{ end -}}
|
|
|
|
EOF
|
|
|
|
dest = "env"
|
|
|
|
dest_prefix = "$${NOMAD_SECRETS_DIR}/"
|
|
|
|
env = true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
data = file("${path.module}/minitor-config.yml")
|
|
|
|
left_delimiter = "[["
|
|
|
|
right_delimiter = "]]"
|
|
|
|
dest = "config.yml"
|
|
|
|
mount = false
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|