make it possible to set max old space size closes #1185

This commit is contained in:
soulgalore 2016-09-14 21:54:54 +02:00
parent 233efda4e0
commit 7f88e68a32
1 changed files with 3 additions and 1 deletions

View File

@ -4,8 +4,10 @@ set -e
google-chrome-stable --version
firefox --version
MAX_OLD_SPACE_SIZE="${MAX_OLD_SPACE_SIZE:-2048}"
echo 'Starting Xvfb ...'
export DISPLAY=:99
2>/dev/null 1>&2 Xvfb :99 -ac -nolisten tcp -screen 0 1500x1200x16 &
sleep 1
exec /usr/src/app/bin/sitespeed.js "$@"
exec node --max-old-space-size=$MAX_OLD_SPACE_SIZE /usr/src/app/bin/sitespeed.js "$@"