Reatart failing services

Restart services that fail checks
This commit is contained in:
IamTheFij 2024-02-18 07:49:16 -08:00
parent f2f415aeac
commit 64a085ef80
2 changed files with 12 additions and 6 deletions

View File

@ -1,12 +1,13 @@
module "minitor" {
source = "./service"
name = "minitor"
image = "iamthefij/minitor-go:1.4.1"
args = ["-metrics", "-config=$${NOMAD_TASK_DIR}/config.yml"]
service_port = 8080
use_wesher = var.use_wesher
prometheus = true
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
env = {
TZ = "America/Los_Angeles",

View File

@ -120,6 +120,11 @@ job "${name}" {
path = "${service_check.path}"
interval = "${service_check.interval}"
timeout = "${service_check.timeout}"
check_restart {
limit = 5
grace = "90s"
}
}
%{~ endif ~}
}