diff --git a/services/wiki.hcl b/services/wiki.hcl index e766647..8eedbdb 100644 --- a/services/wiki.hcl +++ b/services/wiki.hcl @@ -19,7 +19,8 @@ job "wiki" { } network { - port "http" { } + port "captainslog" { } + port "alo" { } } task "captainslog" { @@ -32,7 +33,7 @@ job "wiki" { "/appdata/petruwiki/captainslog", "--listen", "host=0.0.0.0", - "port=${NOMAD_PORT_http}", + "port=${NOMAD_PORT_captainslog}", "authenticated-user-header=X-authentik-username", "readers=ppetru", "writers=ppetru", @@ -57,7 +58,7 @@ job "wiki" { service { name = "captainslog" - port = "http" + port = "captainslog" tags = [ "traefik.enable=true", "traefik.http.routers.captainslog.entryPoints=websecure", @@ -70,5 +71,52 @@ job "wiki" { memory = 256 } } + + task "alo" { + driver = "exec" + + config { + command = "/sw/bin/node" + args = [ + "/appdata/petruwiki/node_modules/tiddlywiki/tiddlywiki.js", + "/appdata/petruwiki/alo", + "--listen", + "host=0.0.0.0", + "port=${NOMAD_PORT_alo}", + "authenticated-user-header=X-authentik-username", + "readers=ppetru,ines", + "writers=ppetru,ines", + "admin=ppetru", + ] + } + + volume_mount { + volume = "appdata" + destination = "/appdata" + } + volume_mount { + volume = "nix-store" + destination = "/nix/store" + } + volume_mount { + volume = "sw" + destination = "/sw" + } + + service { + name = "alowiki" + port = "alo" + tags = [ + "traefik.enable=true", + "traefik.http.routers.alowiki.entryPoints=websecure", + "traefik.http.routers.alowiki.middlewares=authentik@file", + ] + } + + resources { + cpu = 500 + memory = 256 + } + } } }