Move from TiddlyPWA to core tiddlywiki multiwikiserver

This commit is contained in:
2025-03-09 15:47:44 +00:00
parent 1c13a4f0e8
commit b0093eeec6
2 changed files with 72 additions and 99 deletions

72
services/tiddlywiki.hcl Normal file
View File

@@ -0,0 +1,72 @@
job "tiddlywiki" {
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 "mws" {
driver = "exec"
config {
command = "/sw/bin/node"
args = [
"/appdata/tiddlywiki-mws/tiddlywiki.js",
"/appdata/tiddlywiki-mws/editions/multiwikiserver",
"--mws-load-plugin-bags",
"--build",
"load-mws-demo-data",
"--mws-listen",
"host=0.0.0.0",
"port=${NOMAD_PORT_http}",
]
}
volume_mount {
volume = "appdata"
destination = "/appdata"
}
volume_mount {
volume = "nix-store"
destination = "/nix/store"
}
volume_mount {
volume = "sw"
destination = "/sw"
}
service {
name = "tiddlywiki"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.tiddlywiki.rule=Host(`wiki.alo.land`)",
"traefik.http.routers.tiddlywiki.entryPoints=websecure",
"traefik.http.routers.tiddlywiki.middlewares=authentik@file",
]
}
resources {
cpu = 1000
memory = 512
}
}
}
}