Files
DevOpsDash/devops-dash.nomad

85 lines
1.8 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" {}
}
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"]
auth {
username = "robot$gitserver"
password_env = "REGISTRY_TOKEN"
server_address = "registry.i80.dk"
}
}
template {
data = <<EOF
REGISTRY_TOKEN={{ key "harbor/robot/token" }}
EOF
destination = "secrets/env.sh"
env = true
}
env {
PORT = "${NOMAD_PORT_http}"
REDIS_URL = "redis://192.168.15.124:6379"
DEVOPS_MCP_URL = "http://devops-mcp.i80.dk"
DATA_DIR = "/data"
}
resources {
cpu = 100
memory = 128
}
service {
name = "devops-dash"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.devops-dash.rule=Host(`dash.i80.dk`)",
"traefik.http.routers.devops-dash.entrypoints=websecure",
"traefik.http.routers.devops-dash.tls=true",
"traefik.http.routers.devops-dash.tls.certresolver=letsencrypt",
]
check {
type = "http"
path = "/health"
interval = "15s"
timeout = "3s"
}
}
}
}
}