From ac899f2aea27c03bf68f2c9c30261006e2197989 Mon Sep 17 00:00:00 2001 From: Julien Poulton Date: Mon, 12 Jun 2017 11:18:58 +0200 Subject: [PATCH 1/2] feat(npm-install-params): limit-old-space-size --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index c4cac2a..4099a7b 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/bin/bash cd /project/target if [ -f package.json ]; then - npm install + npm install --max-old-space-size=750 fi \ No newline at end of file From b5a2bbcff298de3d33f4a914f9c36398df244787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sylvain=20Fra=C3=AFss=C3=A9?= Date: Mon, 12 Jun 2017 15:26:26 +0200 Subject: [PATCH 2/2] refactor: use the provided max allowed memory --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 4099a7b..05a1e2d 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/bash + cd /project/target if [ -f package.json ]; then - npm install --max-old-space-size=750 -fi \ No newline at end of file + max_memory=${MAX_ALLOWED_MEMORY:-750} + npm install --max-old-space-size=${max_memory} +fi