diff --git a/services/wiki.hcl b/services/wiki.hcl index 83c7d7c..3eb259e 100644 --- a/services/wiki.hcl +++ b/services/wiki.hcl @@ -22,6 +22,7 @@ job "wiki" { port "captainslog" { } port "alo" { } port "pispace" { } + port "grok" { } } task "captainslog" { @@ -168,5 +169,52 @@ job "wiki" { memory = 256 } } + + task "grok" { + driver = "exec" + + config { + command = "/sw/bin/node" + args = [ + "/appdata/wiki/node_modules/tiddlywiki/tiddlywiki.js", + "/appdata/wiki/grok", + "--listen", + "host=0.0.0.0", + "port=${NOMAD_PORT_grok}", + "authenticated-user-header=X-authentik-username", + "readers=ppetru", + "writers=ppetru", + "admin=ppetru", + ] + } + + volume_mount { + volume = "appdata" + destination = "/appdata" + } + volume_mount { + volume = "nix-store" + destination = "/nix/store" + } + volume_mount { + volume = "sw" + destination = "/sw" + } + + service { + name = "groktw" + port = "grok" + tags = [ + "traefik.enable=true", + "traefik.http.routers.groktw.entryPoints=websecure", + "traefik.http.routers.groktw.middlewares=authentik@file", + ] + } + + resources { + cpu = 500 + memory = 256 + } + } } }