From 17f39c9503de542109c318758c6c3be3df5a5aaa Mon Sep 17 00:00:00 2001 From: Henrik Jess Nielsen Date: Sat, 6 Jun 2026 01:09:44 +0200 Subject: [PATCH] Switch to ephemeral_disk, no host_volume required sticky+migrate keeps data across restarts and job updates. DATA_DIR points to NOMAD_ALLOC_DIR/data. Co-Authored-By: Claude Sonnet 4.6 --- citti.nomad | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/citti.nomad b/citti.nomad index 069e6b9..836b5ed 100644 --- a/citti.nomad +++ b/citti.nomad @@ -35,10 +35,10 @@ job "citti" { unlimited = false } - volume "citti-data" { - type = "host" - source = "citti-data" - read_only = false + ephemeral_disk { + size = 500 + sticky = true + migrate = true } service { @@ -73,12 +73,6 @@ job "citti" { task "web" { driver = "docker" - volume_mount { - volume = "citti-data" - destination = "/app/instance" - read_only = false - } - config { image = "registry.i80.dk/gitea/citti:latest" ports = ["http"] @@ -93,7 +87,7 @@ job "citti" { } env { - DATA_DIR = "/app/instance" + DATA_DIR = "${NOMAD_ALLOC_DIR}/data" PORT = "${NOMAD_PORT_http}" HOST = "0.0.0.0" }