This commit is contained in:
2025-04-21 20:28:54 +01:00
parent bded37656a
commit 0dbf41d54c

View File

@@ -1,4 +1,4 @@
job "instasync" { job "igsync" {
datacenters = ["alo"] datacenters = ["alo"]
type = "batch" type = "batch"
@@ -9,11 +9,6 @@ job "instasync" {
} }
group "cron" { group "cron" {
volume "code" {
type = "host"
read_only = true
source = "code"
}
volume "nix-store" { volume "nix-store" {
type = "host" type = "host"
read_only = true read_only = true
@@ -24,18 +19,24 @@ job "instasync" {
read_only = true read_only = true
source = "sw" source = "sw"
} }
volume "appdata" {
type = "host"
read_only = false
source = "appdata"
}
task "sync" { task "sync" {
driver = "exec" driver = "exec"
config { config {
command = "/sw/bin/node" command = "/appdata/igsync/run.sh"
args = ["/code/instasync/sync.js"]
} }
user = "ppetru"
volume_mount { volume_mount {
volume = "code" volume = "appdata"
destination = "/code" destination = "/appdata"
} }
volume_mount { volume_mount {
volume = "nix-store" volume = "nix-store"
@@ -47,7 +48,8 @@ job "instasync" {
} }
resources { resources {
memory = 100 memory = 1024
cpu = 2000
} }
} }
} }