chore: lock start to node22 and rebuild sqlite deps
This commit is contained in:
parent
60da918434
commit
7508bd5f82
1 changed files with 11 additions and 10 deletions
|
|
@ -22,6 +22,7 @@ if command -v apt-get >/dev/null 2>&1; then
|
||||||
apt-get update -y || true
|
apt-get update -y || true
|
||||||
apt-get install -y --no-install-recommends curl ca-certificates gnupg || true
|
apt-get install -y --no-install-recommends curl ca-certificates gnupg || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_node() {
|
install_node() {
|
||||||
local current_node_major=""
|
local current_node_major=""
|
||||||
if command -v node >/dev/null 2>&1; then
|
if command -v node >/dev/null 2>&1; then
|
||||||
|
|
@ -37,6 +38,10 @@ install_node() {
|
||||||
apt-get install -y --no-install-recommends nodejs || true
|
apt-get install -y --no-install-recommends nodejs || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Base toolchain for native modules
|
||||||
|
apt-get update -y || true
|
||||||
|
apt-get install -y --no-install-recommends build-essential python3 make pkg-config || true
|
||||||
|
|
||||||
if ! command -v openssl >/dev/null 2>&1; then
|
if ! command -v openssl >/dev/null 2>&1; then
|
||||||
echo "[start-web] openssl not found; installing via apt-get (requires root)"
|
echo "[start-web] openssl not found; installing via apt-get (requires root)"
|
||||||
apt-get update -y || true
|
apt-get update -y || true
|
||||||
|
|
@ -76,13 +81,9 @@ fi
|
||||||
|
|
||||||
echo "[start-web] launching Next.js"
|
echo "[start-web] launching Next.js"
|
||||||
PORT=${PORT:-3000}
|
PORT=${PORT:-3000}
|
||||||
if command -v node >/dev/null 2>&1; then
|
NODE_MAJOR=$(command -v node >/dev/null 2>&1 && node -v | sed -E 's/^v([0-9]+).*/\1/' || echo "")
|
||||||
NODE_MAJOR=$(node -v | sed -E 's/^v([0-9]+).*/\1/')
|
if [ -z "$NODE_MAJOR" ] || [ "$NODE_MAJOR" -lt 20 ]; then
|
||||||
if [ -n "$NODE_MAJOR" ] && [ "$NODE_MAJOR" -ge 20 ]; then
|
echo "[start-web] Node.js 20+ not available; aborting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
exec node node_modules/next/dist/bin/next start --port "$PORT"
|
exec node node_modules/next/dist/bin/next start --port "$PORT"
|
||||||
else
|
|
||||||
echo "[start-web] node version ($NODE_MAJOR) < 20; using bun to start Next.js"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
# Fallback to bun if node is unavailable or too old
|
|
||||||
exec bun run start -- --port "$PORT"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue