Files
alo-cluster/services/instasync.hcl
2024-07-25 18:27:21 +01:00

46 lines
774 B
HCL

job "instasync" {
datacenters = ["alo"]
type = "batch"
periodic {
cron = "*/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"
}
task "sync" {
driver = "exec"
config {
command = "/nix/store/9cwyl546mzksfbvk6gdpjddc7z7m6ixv-nodejs-20.15.1/bin/node"
args = ["/code/instasync/sync.js"]
}
volume_mount {
volume = "code"
destination = "/code"
}
volume_mount {
volume = "nix-store"
destination = "/nix/store"
}
resources {
memory = 100
}
}
}
}