Skip to content

Commit

Permalink
feat: add a service to weather job
Browse files Browse the repository at this point in the history
Signed-off-by: Bruce Becker <[email protected]>
  • Loading branch information
brucellino committed Apr 19, 2022
1 parent 66331c0 commit d957ad7
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions weather.nomad
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
job "weather" {
constraint {
attribute = "${attr.unique.hostname}"
value = "inky.station"
value = "inky"
}

meta {
team = "inky"
sdk = "python3"
ever = "5min"
every = "5min"
}

periodic {
Expand All @@ -32,6 +32,29 @@ job "weather" {
cpu = 256
memory = 128
}
service {
tags = ["weather"]
// port = "weather"
meta {
team = "inky"
sdk = "python3"
every = "5min"
}
check {
type = "script"
name = "check_python"
command = "python3"
args = ["--version" ]
interval = "20s"
timeout = "5s"

check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}

0 comments on commit d957ad7

Please sign in to comment.