homelab/nomad-job/syncthing.nomad

58 lines
1.1 KiB
Plaintext
Raw 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"
}
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 {
image = "linuxserver/syncthing"
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/syncthing/config:/config",
"/mnt/diskstation/nomad/syncthing/data:/data1"
]
}
resources {
memory = 200
}
}
}
}