Files
nomad-nummer5/apps/apt-cacher-ng/live.hcl
2023-09-19 19:49:36 +02:00

52 lines
927 B
HCL

job "apt-cacher-ng" {
datacenters = ["nummer5"]
group "system" {
count = 1
network {
port "http"{
to = 3142
}
}
service {
name = "apt-cache"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.http.rule=Host(`apt-cache.service.consul`)",
]
}
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"]
}
volume_mount {
volume = "apt-cacher-data"
destination = "/var/cache/apt-cacher-ng"
}
}
}
}