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
}
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"
}