From fa7fb604150b7caed2ad85e4011540bced1eef08 Mon Sep 17 00:00:00 2001 From: Agent Date: Sat, 18 Apr 2026 11:22:39 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20[nomad-step-5]=20S5-fix-4=20=E2=80=94=20?= =?UTF-8?q?staging=20health=20check=20404:=20host=20volume=20empty,=20need?= =?UTF-8?q?s=20content=20seeded=20(#1010)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/disinto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bin/disinto b/bin/disinto index 62081c5..c18ef0c 100755 --- a/bin/disinto +++ b/bin/disinto @@ -1002,6 +1002,23 @@ _disinto_init_nomad() { # Deploy this service echo "" echo "── Deploying ${svc} ───────────────────────────────────────" + + # Seed host volumes before deployment (if needed) + case "$svc" in + staging) + # Seed site-content host volume (/srv/disinto/docker) with static content + # The staging jobspec mounts this volume read-only to /srv/site + local site_content_src="${FACTORY_ROOT}/docker/index.html" + local site_content_dst="/srv/disinto/docker" + if [ -f "$site_content_src" ] && [ -d "$site_content_dst" ]; then + if ! cmp -s "$site_content_src" "${site_content_dst}/index.html" 2>/dev/null; then + echo "[staging] seeding site-content volume..." + cp "$site_content_src" "${site_content_dst}/index.html" + fi + fi + ;; + esac + local jobspec_path="${FACTORY_ROOT}/nomad/jobs/${svc}.hcl" if [ ! -f "$jobspec_path" ]; then echo "Error: jobspec not found: ${jobspec_path}" >&2