Initial config.

This commit is contained in:
2025-04-11 22:26:27 +01:00
parent ad5cf2d44e
commit 13c222f783
2 changed files with 74 additions and 0 deletions

54
services/igsync.hcl Normal file
View File

@@ -0,0 +1,54 @@
job "instasync" {
datacenters = ["alo"]
type = "batch"
periodic {
crons = [ "*/5 * * * *" ]
prohibit_overlap = true
}
group "cron" {
volume "code" {
type = "host"
read_only = true
source = "code"
}
volume "nix-store" {
type = "host"
read_only = true
source = "nix-store"
}
volume "sw" {
type = "host"
read_only = true
source = "sw"
}
task "sync" {
driver = "exec"
config {
command = "/sw/bin/node"
args = ["/code/instasync/sync.js"]
}
volume_mount {
volume = "code"
destination = "/code"
}
volume_mount {
volume = "nix-store"
destination = "/nix/store"
}
volume_mount {
volume = "sw"
destination = "/sw"
}
resources {
memory = 100
}
}
}
}