From e8838d99f1f066822bfced3204bce9d5662fd08a Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Wed, 4 Oct 2023 23:40:37 +0200 Subject: Add syncthing --- jobs/syncthing.nomad.hcl | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 jobs/syncthing.nomad.hcl (limited to 'jobs') diff --git a/jobs/syncthing.nomad.hcl b/jobs/syncthing.nomad.hcl new file mode 100644 index 0000000..98f554d --- /dev/null +++ b/jobs/syncthing.nomad.hcl @@ -0,0 +1,52 @@ +job "syncthing" { + group "syncthing" { + count = 1 + + network { + port "http" { + to = 8384 + } + port "sync" { + static = 22000 + } + port "discovery" { + static = 21027 + } + } + + service { + name = "syncthing-web" + port = "http" + provider = "nomad" + + tags = [ + "nginx.hostname=syncthing.magnusson.space", + "nginx.certname=magnusson.space", + ] + } + + volume "syncthing" { + type = "host" + source = "syncthing" + } + + task "syncthing" { + driver = "docker" + + resources { + cpu = 100 + memory = 150 + } + + volume_mount { + volume = "syncthing" + destination = "/config" + } + + config { + image = "linuxserver/syncthing:1.24.0" + ports = ["sync", "discovery", "http"] + } + } + } +} -- cgit v1.2.3