startup: safeguard to install prod deps in prebuilt images if missing; rebuild bcrypt
This commit is contained in:
7
start.sh
7
start.sh
@@ -10,5 +10,12 @@ mkdir -p /app/.storage/cancellation-tokens
|
|||||||
# Change ownership to nextjs user
|
# Change ownership to nextjs user
|
||||||
chown -R nextjs:nodejs /app/.storage
|
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
|
# Start the application as nextjs user
|
||||||
exec su-exec nextjs node server-dist/index.js
|
exec su-exec nextjs node server-dist/index.js
|
||||||
|
Reference in New Issue
Block a user