Add instasync cronjob and plumbing for nodejs on nomad clients.
This commit is contained in:
41
services/instasync.hcl
Normal file
41
services/instasync.hcl
Normal file
@@ -0,0 +1,41 @@
|
||||
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/2y52nmyfpsq497cppgc43x9v6lkp3q25-nodejs-20.5.1/bin/node"
|
||||
args = ["/code/instasync/sync.js"]
|
||||
}
|
||||
|
||||
volume_mount {
|
||||
volume = "code"
|
||||
destination = "/code"
|
||||
}
|
||||
volume_mount {
|
||||
volume = "nix-store"
|
||||
destination = "/nix/store"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user