homelab/nomad-job/grafana.nomad

52 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-05-10 17:41:18 +00:00
job "grafana" {
datacenters = ["homelab"]
2022-12-10 16:10:32 +00:00
priority = 50
2022-05-10 17:41:18 +00:00
type = "service"
meta {
forcedeploiement = 1
}
group "grafana" {
network {
port "http" {
2022-10-29 08:40:01 +00:00
to = 3000
2022-05-10 17:41:18 +00:00
}
}
service {
name = "grafana"
port = "http"
2022-10-29 08:40:01 +00:00
tags = [
2022-05-23 19:44:34 +00:00
"homer.enable=true",
"homer.name=Grafana",
"homer.service=Monitoring",
"homer.logo=https://grafana.ducamps.win/public/img/grafana_icon.svg",
"homer.target=_blank",
"homer.url=https://${NOMAD_JOB_NAME}.ducamps.win",
2022-05-10 17:41:18 +00:00
"traefik.enable=true",
"traefik.http.routers.grafana.entryPoints=websecure",
"traefik.http.routers.grafana.rule=Host(`grafana.ducamps.win`)",
"traefik.http.routers.grafana.tls.domains[0].sans=grafana.ducamps.win",
"traefik.http.routers.grafana.tls.certresolver=myresolver",
2023-10-07 16:40:40 +00:00
"traefik.http.routers.grafana.entrypoints=web,websecure",
2022-05-10 17:41:18 +00:00
]
}
task "dashboard" {
2022-05-12 09:37:38 +00:00
driver = "docker"
config {
image = "grafana/grafana"
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/grafana/config:/etc/grafana",
"/mnt/diskstation/nomad/grafana/lib:/var/lib/grafana"
]
}
resources {
memory = 150
}
2022-05-10 17:41:18 +00:00
}
}
}