homelab/nomad-job/apps/syncthing.nomad

67 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2022-05-23 17:46:33 +00:00
job "syncthing" {
2022-10-17 19:44:55 +00:00
datacenters = ["homelab"]
2022-12-10 16:10:32 +00:00
priority = 70
2022-10-29 08:40:01 +00:00
type = "service"
2022-05-23 17:46:33 +00:00
meta {
forcedeploy = "0"
}
2022-12-04 08:59:59 +00:00
constraint {
attribute = "${attr.cpu.arch}"
value = "amd64"
}
2024-02-21 18:03:31 +00:00
constraint {
attribute = "${node.class}"
operator = "set_contains"
value = "cluster"
}
2022-05-23 17:46:33 +00:00
2022-10-29 08:40:01 +00:00
group "syncthing" {
2022-05-23 17:46:33 +00:00
network {
mode = "host"
port "http" {
to = 8384
}
2022-10-29 08:40:01 +00:00
port "listen" {
2022-05-23 17:46:33 +00:00
static = 22000
}
port "discovery" {
static = 21027
}
}
task "syncthing" {
driver = "docker"
service {
name = "syncthing-web"
port = "http"
2022-05-23 19:44:34 +00:00
tags = [
2022-10-29 08:40:01 +00:00
"homer.enable=true",
"homer.name=Syncthing",
"homer.service=Application",
"homer.logo=http://${NOMAD_ADDR_http}/assets/img/logo-horizontal.svg",
"homer.target=_blank",
"homer.url=http://${NOMAD_ADDR_http}",
2022-05-23 19:44:34 +00:00
]
2022-05-23 17:46:33 +00:00
}
config {
2024-03-17 17:58:24 +00:00
image = "docker.service.consul:5000/linuxserver/syncthing"
2022-05-23 17:46:33 +00:00
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/syncthing/config:/config",
"/mnt/diskstation/nomad/syncthing/data:/data1"
]
}
env{
PUID = 1000001
GUID = 1000001
}
2022-05-23 17:46:33 +00:00
resources {
memory = 200
}
}
}
}