Initial config.
This commit is contained in:
54
services/igsync.hcl
Normal file
54
services/igsync.hcl
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user