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 "captainslog" { } port "alo" { } } task "captainslog" { driver = "exec" config { command = "/sw/bin/node" args = [ "/appdata/wiki/node_modules/tiddlywiki/tiddlywiki.js", "/appdata/wiki/captainslog", "--listen", "host=0.0.0.0", "port=${NOMAD_PORT_captainslog}", "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 = "captainslog" tags = [ "traefik.enable=true", "traefik.http.routers.captainslog.entryPoints=websecure", "traefik.http.routers.captainslog.middlewares=authentik@file", ] } resources { cpu = 500 memory = 256 } } task "alo" { driver = "exec" config { command = "/sw/bin/node" args = [ "/appdata/wiki/node_modules/tiddlywiki/tiddlywiki.js", "/appdata/wiki/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.rule=Host(`wiki.alo.land`)", "traefik.http.routers.alowiki.entryPoints=websecure", "traefik.http.routers.alowiki.middlewares=authentik@file", ] } resources { cpu = 500 memory = 256 } } } }