homelab/nomad-job/apps/pacoloco.nomad

74 lines
1.7 KiB
Plaintext
Raw Normal View History

2022-05-10 08:35:50 +00:00
job "pacoloco" {
datacenters = ["homelab"]
2022-12-10 16:10:32 +00:00
priority = 50
2022-10-29 08:40:01 +00:00
type = "service"
2022-05-10 08:35:50 +00:00
meta {
forcedeploy = "0"
}
2024-02-21 18:03:31 +00:00
constraint {
attribute = "${node.class}"
operator = "set_contains"
value = "cluster"
}
2022-10-29 08:40:01 +00:00
group "pacoloco" {
2022-05-10 08:35:50 +00:00
network {
mode = "host"
port "http" {
to = 9129
}
}
2022-05-12 09:36:04 +00:00
task "pacoloco-server" {
2022-05-10 08:35:50 +00:00
driver = "docker"
service {
name = "pacoloco"
port = "http"
tags = [
2022-10-29 08:40:01 +00:00
"traefik.enable=true",
2023-11-05 18:08:17 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`arch.ducamps.eu`)",
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=arch.ducamps.eu",
2022-10-29 08:40:01 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
2023-10-07 16:40:40 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
2022-05-10 08:35:50 +00:00
]
}
config {
2024-03-17 17:58:24 +00:00
image = "docker.service.consul:5000/ducampsv/pacoloco"
2022-05-10 08:35:50 +00:00
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/pacoloco:/var/cache/pacoloco",
2022-05-10 08:35:50 +00:00
"local/pacoloco.yaml:/etc/pacoloco.yaml"
]
}
template {
2022-10-29 08:40:01 +00:00
data = <<EOH
2022-05-10 08:35:50 +00:00
port: 9129
cache_dir: /var/cache/pacoloco
purge_files_after: 360000
download_timeout: 3600
repos:
archlinux_x86_64:
urls:
- http://archlinux.mailtunnel.eu
- http://mirror.cyberbits.eu/archlinux
- http://mirrors.niyawe.de/archlinux
2023-11-14 16:45:38 +00:00
archlinux_armv8:
url: http://mirror.archlinuxarm.org
2022-05-10 08:35:50 +00:00
archlinux_armv7h:
url: http://mirror.archlinuxarm.org
prefetch:
cron: 0 0 3 * * * *
ttl_unaccessed_in_days: 30
ttl_unupdated_in_days: 300
EOH
2022-10-29 08:40:01 +00:00
destination = "local/pacoloco.yaml"
2022-05-10 08:35:50 +00:00
}
2022-05-12 09:36:04 +00:00
resources {
memory = 200
}
2022-05-10 08:35:50 +00:00
}
}
}