fix(storyteller): OOM fix - limit Node heap, restore \, bump RAM to 10GB
- NODE_OPTIONS=--max-old-space-size=4096 to cap V8 heap during yarn install/build - Restore \ prefixes removed by formatter - RAM 8192 -> 10240 in JSON - yarn install --network-timeout 600000 for large monorepo fetch
This commit is contained in:
@@ -33,8 +33,9 @@ fetch_and_deploy_gl_release "storyteller" "storyteller-platform/storyteller" "ta
|
||||
|
||||
msg_info "Setting up Storyteller"
|
||||
cd /opt/storyteller
|
||||
yarn install
|
||||
gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
$STD yarn install --network-timeout 600000
|
||||
$STD gcc -g -fPIC -rdynamic -shared web/sqlite/uuid.c -o web/sqlite/uuid.c.so
|
||||
STORYTELLER_SECRET_KEY=$(openssl rand -base64 32)
|
||||
cat <<EOF >/opt/storyteller/.env
|
||||
STORYTELLER_SECRET_KEY=${STORYTELLER_SECRET_KEY}
|
||||
@@ -54,7 +55,7 @@ export CI=1
|
||||
export NODE_ENV=production
|
||||
export NEXT_TELEMETRY_DISABLED=1
|
||||
export SQLITE_NATIVE_BINDING=/opt/storyteller/node_modules/better-sqlite3/build/Release/better_sqlite3.node
|
||||
yarn workspaces foreach -Rpt --from @storyteller-platform/web --exclude @storyteller-platform/eslint run build
|
||||
$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
|
||||
if [[ -d /opt/storyteller/web/public ]]; then
|
||||
cp -r /opt/storyteller/web/public /opt/storyteller/web/.next/standalone/web/public
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"script": "ct/storyteller.sh",
|
||||
"resources": {
|
||||
"cpu": 4,
|
||||
"ram": 8192,
|
||||
"ram": 10240,
|
||||
"hdd": 16,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
|
||||
Reference in New Issue
Block a user