Compare commits
2 Commits
1c13a4f0e8
...
32c708b980
| Author | SHA1 | Date | |
|---|---|---|---|
| 32c708b980 | |||
| b0093eeec6 |
@@ -1,99 +0,0 @@
|
|||||||
job "tiddlypwa" {
|
|
||||||
datacenters = ["alo"]
|
|
||||||
|
|
||||||
group "server" {
|
|
||||||
volume "code" {
|
|
||||||
type = "host"
|
|
||||||
read_only = true
|
|
||||||
source = "code"
|
|
||||||
}
|
|
||||||
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"
|
|
||||||
}
|
|
||||||
volume "sw" {
|
|
||||||
type = "host"
|
|
||||||
read_only = true
|
|
||||||
source = "sw"
|
|
||||||
}
|
|
||||||
|
|
||||||
network {
|
|
||||||
port "http" { }
|
|
||||||
}
|
|
||||||
|
|
||||||
task "sync" {
|
|
||||||
driver = "exec"
|
|
||||||
|
|
||||||
config {
|
|
||||||
command = "/sw/bin/deno"
|
|
||||||
args = [
|
|
||||||
"run",
|
|
||||||
"--unstable-broadcast-channel",
|
|
||||||
"--allow-env",
|
|
||||||
"--allow-read=/appdata/tiddlypwa",
|
|
||||||
"--allow-write=/appdata/tiddlypwa",
|
|
||||||
"--allow-net=:${NOMAD_PORT_http}",
|
|
||||||
"/code/tiddlypwa/server/run.ts",
|
|
||||||
"--port=${NOMAD_PORT_http}",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
env {
|
|
||||||
ADMIN_PASSWORD_HASH = "T2JTyY9jplOqXO5FwnLmPpUu79SXOOW7hav9moTQuD4"
|
|
||||||
ADMIN_PASSWORD_SALT = "SB_uRmIlJPPssPWyOUEip-HwQZJZn1q2A6QA8ptB7aY"
|
|
||||||
DB_PATH = "/appdata/tiddlypwa/tiddly.db"
|
|
||||||
}
|
|
||||||
|
|
||||||
volume_mount {
|
|
||||||
volume = "code"
|
|
||||||
destination = "/code"
|
|
||||||
}
|
|
||||||
volume_mount {
|
|
||||||
volume = "appdata"
|
|
||||||
destination = "/appdata"
|
|
||||||
}
|
|
||||||
volume_mount {
|
|
||||||
volume = "nix-store"
|
|
||||||
destination = "/nix/store"
|
|
||||||
}
|
|
||||||
volume_mount {
|
|
||||||
volume = "sw"
|
|
||||||
destination = "/sw"
|
|
||||||
}
|
|
||||||
|
|
||||||
service {
|
|
||||||
name = "tiddlypwa"
|
|
||||||
port = "http"
|
|
||||||
tags = [
|
|
||||||
"traefik.enable=true",
|
|
||||||
"traefik.http.routers.tiddlypwa-main.rule=Host(`wiki.alo.land`)",
|
|
||||||
"traefik.http.routers.tiddlypwa-main.entryPoints=websecure",
|
|
||||||
"traefik.http.routers.tiddlypwa-main.middlewares=authentik@file",
|
|
||||||
# by default, / is the admin UI and the wikis are behind a token
|
|
||||||
# move the admin from / to /admin
|
|
||||||
"traefik.http.routers.tiddlypwa-admin.rule=Host(`wiki.alo.land`) && Path(`/admin`)",
|
|
||||||
"traefik.http.routers.tiddlypwa-admin.entryPoints=websecure",
|
|
||||||
"traefik.http.routers.tiddlypwa-admin.middlewares=authentik@file,tiddlypwa-admin",
|
|
||||||
"traefik.http.middlewares.tiddlypwa-admin.replacepath.path=/",
|
|
||||||
# redirect / to the alo wiki
|
|
||||||
"traefik.http.routers.tiddlypwa-root.rule=Host(`wiki.alo.land`) && Path(`/`)",
|
|
||||||
"traefik.http.routers.tiddlypwa-root.entryPoints=websecure",
|
|
||||||
"traefik.http.routers.tiddlypwa-root.middlewares=authentik@file,tiddlypwa-root",
|
|
||||||
"traefik.http.middlewares.tiddlypwa-root.redirectregex.regex=^https://wiki.alo.land/$",
|
|
||||||
"traefik.http.middlewares.tiddlypwa-root.redirectregex.replacement=https://wiki.alo.land/3B5wygCxN7Xq47G9Gr6wD/app.html",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
72
services/tiddlywiki.hcl
Normal file
72
services/tiddlywiki.hcl
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -68,6 +68,8 @@ job "wordpress" {
|
|||||||
"traefik.http.routers.wordpress.entryPoints=web4proxy",
|
"traefik.http.routers.wordpress.entryPoints=web4proxy",
|
||||||
"traefik.http.routers.wordpress.rule=Host(`wordpress.paler.net`) || Host(`ines.paler.net`) || Host(`coachingfor.me`) || Host(`coachingfor.work`) || Host(`petru.ines.paler.net`) || Host(`liam.paler.net`) || Host(`tomas.paler.net`) || Host(`musictogethersilvercoast.pt`)",
|
"traefik.http.routers.wordpress.rule=Host(`wordpress.paler.net`) || Host(`ines.paler.net`) || Host(`coachingfor.me`) || Host(`coachingfor.work`) || Host(`petru.ines.paler.net`) || Host(`liam.paler.net`) || Host(`tomas.paler.net`) || Host(`musictogethersilvercoast.pt`)",
|
||||||
"traefik.http.routers.wordpress.middlewares=compress@file",
|
"traefik.http.routers.wordpress.middlewares=compress@file",
|
||||||
|
"traefik.http.routers.alopress.entryPoints=websecure",
|
||||||
|
"traefik.http.routers.alopress.rule=Host(`aloland.v.paler.net`)",
|
||||||
]
|
]
|
||||||
|
|
||||||
check {
|
check {
|
||||||
|
|||||||
Reference in New Issue
Block a user