From 1a519ad63b5c67839ad2ae8a3c1bb4c29af991e0 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:42:51 +0200 Subject: [PATCH] Fix Nametag: copy static assets into standalone dir Next.js standalone output requires .next/static and public/ to be copied manually into .next/standalone/ for CSS/JS to be served. Also source .env before prisma generate in update script. --- ct/nametag.sh | 5 +++++ install/nametag-install.sh | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ct/nametag.sh b/ct/nametag.sh index 40133a7d..715fd8eb 100644 --- a/ct/nametag.sh +++ b/ct/nametag.sh @@ -44,8 +44,13 @@ function update_script() { msg_info "Rebuilding Application" cd /opt/nametag $STD npm ci + set -a + source /opt/nametag/.env + set +a $STD npx prisma generate $STD npm run build + cp -r /opt/nametag/.next/static /opt/nametag/.next/standalone/.next/static + cp -r /opt/nametag/public /opt/nametag/.next/standalone/public msg_ok "Rebuilt Application" msg_info "Restoring Data" diff --git a/install/nametag-install.sh b/install/nametag-install.sh index ec730b7b..fe3f1a46 100644 --- a/install/nametag-install.sh +++ b/install/nametag-install.sh @@ -45,6 +45,8 @@ set -a source /opt/nametag/.env set +a $STD npm run build +cp -r /opt/nametag/.next/static /opt/nametag/.next/standalone/.next/static +cp -r /opt/nametag/public /opt/nametag/.next/standalone/public msg_ok "Built Application" msg_info "Running Production Seed"