All checks were successful
continuous-integration/drone/push Build is passing
59 lines
1.0 KiB
HCL
59 lines
1.0 KiB
HCL
|
|
job "apt-cacher-ng" {
|
|
datacenters = ["nummer5"]
|
|
node_pool = "sys"
|
|
priority = 90
|
|
|
|
group "system" {
|
|
count = 1
|
|
|
|
network {
|
|
port "http"{
|
|
to = 3142
|
|
}
|
|
}
|
|
spread {
|
|
attribute = "${node.unique.id}"
|
|
weight = 100
|
|
}
|
|
service {
|
|
name = "apt-cache"
|
|
port = "http"
|
|
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.http.rule=Host(`apt-cache.service.nr5`)",
|
|
]
|
|
|
|
}
|
|
|
|
volume "apt-cacher-data" {
|
|
type = "csi"
|
|
read_only = false
|
|
source = "apt-cacher-data"
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
task "server" {
|
|
env {
|
|
PORT = "${NOMAD_PORT_http}"
|
|
NODE_IP = "${NOMAD_IP_http}"
|
|
}
|
|
|
|
driver = "podman"
|
|
|
|
config {
|
|
image = "cr.wks/apt-cacher-ng"
|
|
ports = ["http"]
|
|
force_pull = true
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "apt-cacher-data"
|
|
destination = "/var/cache/apt-cacher-ng"
|
|
}
|
|
}
|
|
}
|
|
}
|