From 2437d46aa9bf42784a98b4205f390bb5ba4e220d Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Wed, 22 Oct 2025 14:51:39 +0100 Subject: [PATCH] Move unifi to zippy. --- services/unifi.hcl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/services/unifi.hcl b/services/unifi.hcl index c17ba96..937653f 100644 --- a/services/unifi.hcl +++ b/services/unifi.hcl @@ -6,6 +6,14 @@ job "unifi" { } group "net" { + # Run on primary storage node (zippy) for local disk performance + # MongoDB needs local disk, not NFS + # TODO: can move to fractal once it's converted to NixOS + constraint { + attribute = "${meta.storage_role}" + value = "primary" + } + network { port "p8443" { static = 8443 } port "p3478" { static = 3478 } @@ -38,7 +46,7 @@ job "unifi" { "p5514", ] volumes = [ - "/data/compute/appdata/unifi/data:/config", + "/data/services/unifi/data:/config", ] } @@ -105,8 +113,8 @@ job "unifi" { image = "mongo:8.0" ports = ["mongodb"] volumes = [ - "/data/compute/appdata/unifi/mongodb:/data/db", - "/data/compute/appdata/unifi/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro" + "/data/services/unifi/mongodb:/data/db", + "/data/services/unifi/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro" ] }