diff --git a/start.sh b/start.sh index 32cf6a8..60dd82e 100644 --- a/start.sh +++ b/start.sh @@ -10,5 +10,12 @@ mkdir -p /app/.storage/cancellation-tokens # Change ownership to nextjs user chown -R nextjs:nodejs /app/.storage +# Ensure runtime dependencies exist (for prebuilt images) +if [ ! -d "/app/node_modules/hono" ]; then + echo "[startup] Installing runtime dependencies (prebuilt safeguard)..." + pnpm install --frozen-lockfile --prod --ignore-scripts=false || pnpm install --prod || true + pnpm rebuild bcrypt || true +fi + # Start the application as nextjs user exec su-exec nextjs node server-dist/index.js