From 2ca9ae4d1bb4d5c4af830c4432347184fe0b87cb Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:59:43 +0100 Subject: [PATCH] fix(storyteller): use cp -rT to merge into existing standalone dirs - cp -r creates nested dirs when target already exists (sqlite/sqlite/) - cp -rT merges source contents INTO the target directory - mkdir -p ensures target dirs exist before merge - Fixes uuid.c.so not being found in standalone/web/sqlite/ --- ct/storyteller.sh | 12 ++++++++---- install/storyteller-install.sh | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ct/storyteller.sh b/ct/storyteller.sh index b10f5602..20c5a254 100644 --- a/ct/storyteller.sh +++ b/ct/storyteller.sh @@ -54,12 +54,16 @@ function update_script() { export NEXT_TELEMETRY_DISABLED=1 export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node $STD yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build - cp -r /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static + mkdir -p /opt/storyteller/web/.next/standalone/web/.next/static + cp -rT /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static if [[ -d /opt/storyteller/web/public ]]; then - cp -r /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public + mkdir -p /opt/storyteller/web/.next/standalone/web/public + cp -rT /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public fi - cp -r /opt/storyteller/web/migrations /opt/storyteller/web/.next/standalone/web/migrations - cp -r /opt/storyteller/web/sqlite /opt/storyteller/web/.next/standalone/web/sqlite + mkdir -p /opt/storyteller/web/.next/standalone/web/migrations + cp -rT /opt/storyteller/web/migrations /opt/storyteller/web/.next/standalone/web/migrations + mkdir -p /opt/storyteller/web/.next/standalone/web/sqlite + cp -rT /opt/storyteller/web/sqlite /opt/storyteller/web/.next/standalone/web/sqlite ln -sf /opt/storyteller/.env /opt/storyteller/web/.next/standalone/web/.env msg_ok "Rebuilt Storyteller" diff --git a/install/storyteller-install.sh b/install/storyteller-install.sh index a2cc760a..fba102f6 100644 --- a/install/storyteller-install.sh +++ b/install/storyteller-install.sh @@ -56,12 +56,16 @@ export NODE_ENV=production export NEXT_TELEMETRY_DISABLED=1 export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node $STD yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build -cp -r /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static +mkdir -p /opt/storyteller/web/.next/standalone/web/.next/static +cp -rT /opt/storyteller/web/.next/static /opt/storyteller/web/.next/standalone/web/.next/static if [[ -d /opt/storyteller/web/public ]]; then - cp -r /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public + mkdir -p /opt/storyteller/web/.next/standalone/web/public + cp -rT /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public fi -cp -r /opt/storyteller/web/migrations /opt/storyteller/web/.next/standalone/web/migrations -cp -r /opt/storyteller/web/sqlite /opt/storyteller/web/.next/standalone/web/sqlite +mkdir -p /opt/storyteller/web/.next/standalone/web/migrations +cp -rT /opt/storyteller/web/migrations /opt/storyteller/web/.next/standalone/web/migrations +mkdir -p /opt/storyteller/web/.next/standalone/web/sqlite +cp -rT /opt/storyteller/web/sqlite /opt/storyteller/web/.next/standalone/web/sqlite ln -sf /opt/storyteller/.env /opt/storyteller/web/.next/standalone/web/.env msg_ok "Built Storyteller"