From 0fd43ff6fa53f2f302aece5754b5c8c4ad7385b4 Mon Sep 17 00:00:00 2001 From: tokii Date: Sun, 22 Feb 2026 09:58:41 +0100 Subject: [PATCH] docs: Update Nomad deployment docs to include volume configuration changes --- docs/deploying/nomad.mdx | 92 +++++++++++++--------------------------- 1 file changed, 29 insertions(+), 63 deletions(-) diff --git a/docs/deploying/nomad.mdx b/docs/deploying/nomad.mdx index df538a38c..f7d06143b 100644 --- a/docs/deploying/nomad.mdx +++ b/docs/deploying/nomad.mdx @@ -6,6 +6,12 @@ This given configuration assumes that you have a traefik reverse proxy running. ## Persistence The database being a RockDB file, it is recommended to use a volume to persist the data. The example below uses a volume, you need to configure the CSI driver on your cluster. + +| Volume Name | Mount Path | Purpose | +|-------------|------------|---------| +| continuwuity-volume | `/var/lib/continuwuity` | Store the database | +| continuwuity-media-volume | `/var/lib/continuwuity/media` | Store uploaded media | + ## Configuration ### Using environment variables ```hcl @@ -40,15 +46,28 @@ job "continuwuity" { ] } - volume "continuwuity-db-volume" { + volume "continuwuity-volume" { type = "csi" read_only = false - source = "continuwuity-db-vol" + source = "continuwuity-volume" attachment_mode = "file-system" access_mode = "single-node-writer" per_alloc = false } + volume "continuwuity-media-volume" { + type = "csi" + read_only = false + source = "continuwuity-media-volume" + attachment_mode = "file-system" + access_mode = "single-node-writer" + per_alloc = false + + mount_options { + mount_flags = [] + } + } + task "continuwuity" { driver = "docker" @@ -73,9 +92,14 @@ EOF } volume_mount { - volume = "continuwuity-db-volume" + volume = "continuwuity-volume" destination = "/var/lib/continuwuity" } + + volume_mount { + volume = "continuwuity-media-volume" + destination = "/var/lib/continuwuity/media" + } } } } @@ -83,70 +107,12 @@ EOF ### Using consul ```hcl -job "continuwuity" { - datacenters = ["dc1"] - type = "service" - node_pool = "default" - - group "continuwuity" { - count = 1 - - network { - port "http" { - static = 6167 - } - } - - service { - name = "continuwuity" - port = "http" - tags = [ - "traefik.enable=true", - "traefik.http.routers.continuwuity.rule=(Host(`matrix.example.com`) || (Host(`example.com`) && PathPrefix(`/.well-known/matrix`)))", - "traefik.http.routers.continuwuity.entrypoints=https", - "traefik.http.routers.continuwuity.tls=true", - "traefik.http.routers.continuwuity.tls.certresolver=letsencrypt", - "traefik.http.routers.continuwuity-http.rule=(Host(`matrix.example.com`) || (Host(`example.com`) && PathPrefix(`/.well-known/matrix`)))", - "traefik.http.routers.continuwuity-http.entrypoints=http", - "traefik.http.routers.continuwuity-http.middlewares=continuwuity-redirect", - "traefik.http.middlewares.continuwuity-redirect.redirectscheme.scheme=https", - "traefik.http.middlewares.continuwuity-redirect.redirectscheme.permanent=true", - ] - } - - volume "continuwuity-db-volume" { - type = "csi" - read_only = false - source = "continuwuity-db-vol" - attachment_mode = "file-system" - access_mode = "single-node-writer" - per_alloc = false - } - - task "continuwuity" { - driver = "docker" - - config { - image = "forgejo.ellis.link/continuwuation/continuwuity:latest" - ports = ["http"] - - volumes = [ - "local/conduwuit.toml:/etc/conduwuit/conduwuit.toml" - ] - } - +... template { data = <