Set up MCP for alo wiki.

This commit is contained in:
2025-12-22 13:03:27 +00:00
parent 3b2cd0c3cf
commit 08db384f60
2 changed files with 65 additions and 7 deletions

View File

@@ -1,11 +1,14 @@
job "tiddlywiki-mcp" { job "tiddlywiki-mcp" {
datacenters = ["alo"] datacenters = ["alo"]
group "captainslog" { group "servers" {
network { network {
port "http" { port "captainslog" {
static = 3500 static = 3500
} }
port "alowiki" {
static = 3501
}
} }
volume "services" { volume "services" {
@@ -26,7 +29,7 @@ job "tiddlywiki-mcp" {
read_only = true read_only = true
} }
task "mcp-server" { task "captainslog" {
driver = "exec" driver = "exec"
config { config {
@@ -36,10 +39,11 @@ job "tiddlywiki-mcp" {
env { env {
MCP_TRANSPORT = "http" MCP_TRANSPORT = "http"
MCP_PORT = "${NOMAD_PORT_http}" MCP_PORT = "${NOMAD_PORT_captainslog}"
CONSUL_SERVICE = "captainslog.service.consul" CONSUL_SERVICE = "captainslog.service.consul"
AUTH_HEADER = "X-Oidc-Username" AUTH_HEADER = "X-Oidc-Username"
AUTH_USER = "claude-code" AUTH_USER = "claude-code"
EMBEDDINGS_DB_PATH = "/data/services/tiddlywiki-mcp/embeddings-captainslog.db"
} }
volume_mount { volume_mount {
@@ -62,7 +66,61 @@ job "tiddlywiki-mcp" {
service { service {
name = "tiddlywiki-mcp-captainslog" name = "tiddlywiki-mcp-captainslog"
port = "http" port = "captainslog"
check {
type = "http"
path = "/health"
interval = "10s"
timeout = "2s"
}
}
resources {
memory = 256
}
user = "ppetru"
}
task "alowiki" {
driver = "exec"
config {
command = "/sw/bin/node"
args = ["/data/services/tiddlywiki-mcp/dist/index.js"]
}
env {
MCP_TRANSPORT = "http"
MCP_PORT = "${NOMAD_PORT_alowiki}"
CONSUL_SERVICE = "alowiki.service.consul"
AUTH_HEADER = "X-Oidc-Username"
AUTH_USER = "claude-code"
EMBEDDINGS_DB_PATH = "/data/services/tiddlywiki-mcp/embeddings-alowiki.db"
}
volume_mount {
volume = "services"
destination = "/data/services"
read_only = false
}
volume_mount {
volume = "nix-store"
destination = "/nix/store"
read_only = true
}
volume_mount {
volume = "sw"
destination = "/sw"
read_only = true
}
service {
name = "tiddlywiki-mcp-alowiki"
port = "alowiki"
check { check {
type = "http" type = "http"

View File

@@ -86,8 +86,8 @@ job "wiki" {
"host=0.0.0.0", "host=0.0.0.0",
"port=${NOMAD_PORT_alo}", "port=${NOMAD_PORT_alo}",
"authenticated-user-header=X-Oidc-Username", "authenticated-user-header=X-Oidc-Username",
"readers=ppetru,ines", "readers=ppetru,ines,claude-code",
"writers=ppetru,ines", "writers=ppetru,ines,claude-code",
"admin=ppetru", "admin=ppetru",
] ]
} }