Switch to ephemeral_disk, no host_volume required
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 40s

sticky+migrate keeps data across restarts and job updates.
DATA_DIR points to NOMAD_ALLOC_DIR/data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Henrik Jess Nielsen
2026-06-06 01:09:44 +02:00
parent ff01f4e120
commit 17f39c9503

View File

@@ -35,10 +35,10 @@ job "citti" {
unlimited = false unlimited = false
} }
volume "citti-data" { ephemeral_disk {
type = "host" size = 500
source = "citti-data" sticky = true
read_only = false migrate = true
} }
service { service {
@@ -73,12 +73,6 @@ job "citti" {
task "web" { task "web" {
driver = "docker" driver = "docker"
volume_mount {
volume = "citti-data"
destination = "/app/instance"
read_only = false
}
config { config {
image = "registry.i80.dk/gitea/citti:latest" image = "registry.i80.dk/gitea/citti:latest"
ports = ["http"] ports = ["http"]
@@ -93,7 +87,7 @@ job "citti" {
} }
env { env {
DATA_DIR = "/app/instance" DATA_DIR = "${NOMAD_ALLOC_DIR}/data"
PORT = "${NOMAD_PORT_http}" PORT = "${NOMAD_PORT_http}"
HOST = "0.0.0.0" HOST = "0.0.0.0"
} }