chore: install node/openssl in start script when apt-get available

This commit is contained in:
Esdras Renan 2025-11-19 18:29:49 -03:00
parent 3e4015cecb
commit c9c8b66ea3

View file

@ -15,15 +15,20 @@ echo "[start-web] Using APP_DIR=$(pwd)"
echo "[start-web] NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-}"
echo "[start-web] NEXT_PUBLIC_CONVEX_URL=${NEXT_PUBLIC_CONVEX_URL:-}"
# Ensure openssl is available for Prisma runtime checks (best-effort, idempotent)
if ! command -v openssl >/dev/null 2>&1; then
if command -v apt-get >/dev/null 2>&1; then
# Ensure system deps for native modules (best-effort, idempotent)
if command -v apt-get >/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)"
apt-get update -y >/dev/null 2>&1 || true
apt-get install -y openssl >/dev/null 2>&1 || true
else
echo "[start-web] openssl not found and apt-get unavailable; continuing" >&2
fi
if ! command -v node >/dev/null 2>&1; then
echo "[start-web] node not found; installing via apt-get (requires root)"
apt-get update -y >/dev/null 2>&1 || true
apt-get install -y nodejs npm >/dev/null 2>&1 || true
fi
else
echo "[start-web] apt-get unavailable; skipping system deps install" >&2
fi
# Bun keeps its store in node_modules/.bun by default; ensure it exists and is writable