Files
DevOpsDash/devops-dash.nomad

94 lines
2.0 KiB
Plaintext
Raw Normal View History

job "devops-dash" {
datacenters = ["dc1"]
type = "service"
constraint {
attribute = "${node.unique.name}"
value = "autobox.i80.dk"
}
group "devops-dash" {
count = 1
network {
port "http" {}
}
# host volume disabled until autobox is configured.
# To enable: add to /etc/nomad.d/client.hcl on autobox:
# host_volume "devops-mcp-data" {
# path = "/opt/devops-mcp/data"
# read_only = false
# }
# Then: mkdir -p /opt/devops-mcp/data && systemctl restart nomad
#
# volume "devops-mcp-data" {
# type = "host"
# read_only = true
# source = "devops-mcp-data"
# }
task "devops-dash" {
driver = "docker"
# volume_mount {
# volume = "devops-mcp-data"
# destination = "/data"
# read_only = true
# }
config {
image = "registry.i80.dk/gitea/devops-dash:latest"
ports = ["http"]
force_pull = true
auth {
username = "robot$gitserver"
password = "${HARBOR_ROBOT_TOKEN}"
}
}
template {
data = <<EOH
HARBOR_ROBOT_TOKEN="{{ key "harbor/robot/token" }}"
EOH
destination = "secrets/registry.env"
env = true
}
env {
PORT = "${NOMAD_PORT_http}"
HOST = "0.0.0.0"
REDIS_URL = "redis://192.168.15.124:6379"
DEVOPS_MCP_URL = "https://devops-mcp.i80.dk"
DATA_DIR = "/data"
PYTHONUNBUFFERED = "1"
}
resources {
cpu = 200
memory = 256
}
service {
provider = "consul"
name = "devops-dash"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.devops-dash.rule=Host(`dash.i80.dk`)",
"traefik.http.routers.devops-dash.tls=true",
]
check {
type = "http"
path = "/health"
interval = "15s"
timeout = "3s"
}
}
}
}
}