Files
alo-cluster/services/grafana.hcl
2023-07-10 06:36:41 +01:00

58 lines
1.0 KiB
HCL

job "grafana" {
datacenters = ["alo"]
group "monitoring" {
network {
port "http" {
host_network = "tailscale"
}
}
volume "data-volume" {
type = "csi"
source = "grafana-data"
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
task "grafana" {
driver = "docker"
config {
image = "grafana/grafana-enterprise"
ports = [ "http" ]
}
env {
GF_AUTH_BASIC_ENABLED = "false"
GF_SERVER_HTTP_PORT = "${NOMAD_PORT_http}"
}
volume_mount {
volume = "data-volume"
destination = "/var/lib/grafana"
}
service {
port = "http"
name = "grafana"
tags = [
"traefik.enable=true",
"traefik.http.routers.grafana.entryPoints=websecure",
]
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
resources {
cpu = 100
memory = 128
}
}
}
}