46 lines
824 B
HCL
46 lines
824 B
HCL
job "resol-gateway" {
|
|
datacenters = ["alo"]
|
|
|
|
group "gw" {
|
|
volume "code" {
|
|
type = "host"
|
|
read_only = true
|
|
source = "code"
|
|
}
|
|
volume "nix-store" {
|
|
type = "host"
|
|
read_only = true
|
|
source = "nix-store"
|
|
}
|
|
|
|
network {
|
|
port "http" {
|
|
static = "3333"
|
|
}
|
|
}
|
|
|
|
task "server" {
|
|
driver = "exec"
|
|
|
|
config {
|
|
command = "/nix/store/2y52nmyfpsq497cppgc43x9v6lkp3q25-nodejs-20.5.1/bin/node"
|
|
args = ["/code/resol-vbus/examples/json-live-data-server/index.js"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "code"
|
|
destination = "/code"
|
|
}
|
|
volume_mount {
|
|
volume = "nix-store"
|
|
destination = "/nix/store"
|
|
}
|
|
|
|
service {
|
|
name = "resol-gateway"
|
|
port = "http"
|
|
}
|
|
}
|
|
}
|
|
}
|