Initial config.
This commit is contained in:
74
services/petruwiki.hcl
Normal file
74
services/petruwiki.hcl
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
job "petruwiki" {
|
||||||
|
datacenters = ["alo"]
|
||||||
|
|
||||||
|
group "server" {
|
||||||
|
volume "appdata" {
|
||||||
|
type = "host"
|
||||||
|
read_only = false
|
||||||
|
source = "appdata"
|
||||||
|
}
|
||||||
|
volume "nix-store" {
|
||||||
|
type = "host"
|
||||||
|
read_only = true
|
||||||
|
source = "nix-store"
|
||||||
|
}
|
||||||
|
volume "sw" {
|
||||||
|
type = "host"
|
||||||
|
read_only = true
|
||||||
|
source = "sw"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "http" { }
|
||||||
|
}
|
||||||
|
|
||||||
|
task "wiki" {
|
||||||
|
driver = "exec"
|
||||||
|
|
||||||
|
config {
|
||||||
|
command = "/sw/bin/node"
|
||||||
|
args = [
|
||||||
|
"/appdata/petruwiki/node_modules/tiddlywiki/tiddlywiki.js",
|
||||||
|
"/appdata/petruwiki/petruwiki",
|
||||||
|
"--listen",
|
||||||
|
"host=0.0.0.0",
|
||||||
|
"port=${NOMAD_PORT_http}",
|
||||||
|
"authenticated-user-header=X-authentik-username",
|
||||||
|
"readers=ppetru",
|
||||||
|
"writers=ppetru",
|
||||||
|
"admin=ppetru",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
user = "ppetru"
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "appdata"
|
||||||
|
destination = "/appdata"
|
||||||
|
}
|
||||||
|
volume_mount {
|
||||||
|
volume = "nix-store"
|
||||||
|
destination = "/nix/store"
|
||||||
|
}
|
||||||
|
volume_mount {
|
||||||
|
volume = "sw"
|
||||||
|
destination = "/sw"
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
name = "petruwiki"
|
||||||
|
port = "http"
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
"traefik.http.routers.petruwiki.entryPoints=websecure",
|
||||||
|
"traefik.http.routers.petruwiki.middlewares=authentik@file",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 1000
|
||||||
|
memory = 512
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user