job "wiki" { datacenters = ["alo"] group "servers" { 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 "captainslog" { driver = "exec" config { command = "/sw/bin/node" args = [ "/appdata/petruwiki/node_modules/tiddlywiki/tiddlywiki.js", "/appdata/petruwiki/captainslog", "--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 = "captainslog" port = "http" tags = [ "traefik.enable=true", "traefik.http.routers.captainslog.entryPoints=websecure", "traefik.http.routers.captainslog.middlewares=authentik@file", ] } resources { cpu = 500 memory = 256 } } } }