57 lines
925 B
HCL
57 lines
925 B
HCL
job "igsync" {
|
|
datacenters = ["alo"]
|
|
|
|
type = "batch"
|
|
|
|
periodic {
|
|
crons = [ "*/5 * * * *" ]
|
|
prohibit_overlap = true
|
|
}
|
|
|
|
group "cron" {
|
|
volume "nix-store" {
|
|
type = "host"
|
|
read_only = true
|
|
source = "nix-store"
|
|
}
|
|
volume "sw" {
|
|
type = "host"
|
|
read_only = true
|
|
source = "sw"
|
|
}
|
|
volume "services" {
|
|
type = "host"
|
|
read_only = false
|
|
source = "services"
|
|
}
|
|
|
|
task "sync" {
|
|
driver = "exec"
|
|
|
|
config {
|
|
command = "/data/services/igsync/run.sh"
|
|
}
|
|
|
|
user = "ppetru"
|
|
|
|
volume_mount {
|
|
volume = "services"
|
|
destination = "/data/services"
|
|
}
|
|
volume_mount {
|
|
volume = "nix-store"
|
|
destination = "/nix/store"
|
|
}
|
|
volume_mount {
|
|
volume = "sw"
|
|
destination = "/sw"
|
|
}
|
|
|
|
resources {
|
|
memory = 1024
|
|
cpu = 2000
|
|
}
|
|
}
|
|
}
|
|
}
|