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.
This commit is contained in:
CanbiZ (MickLesk)
2026-03-30 11:42:51 +02:00
parent 12271687c2
commit 1a519ad63b
2 changed files with 7 additions and 0 deletions

View File

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