From 4b40ed04e1f01e6b58d22965a16ee8064fd81cbb Mon Sep 17 00:00:00 2001 From: Jonas Janz Date: Sun, 26 May 2019 12:42:29 +0200 Subject: [PATCH 1/3] fix: respect PHP_MEMORY_LIMIT for composer After setting PHP_MEMORY_LIMIT to `-1` composer still exited with an OOM error. Setting the parameter directly through php fixed the issue --- 7.2/s2i/bin/assemble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7.2/s2i/bin/assemble b/7.2/s2i/bin/assemble index 4549c2429..2d4f78499 100755 --- a/7.2/s2i/bin/assemble +++ b/7.2/s2i/bin/assemble @@ -41,7 +41,7 @@ if [ -f composer.json ]; then fi # Install App dependencies using Composer - ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS + php -d memory_limit=$PHP_MEMORY_LIMIT ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS if [ ! -f composer.lock ]; then echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n" From 0bd6b9450c2937b447afa07326ac8b98a42c4c13 Mon Sep 17 00:00:00 2001 From: PixelJonas <5434875+PixelJonas@users.noreply.github.com> Date: Fri, 14 Jan 2022 09:11:28 +0100 Subject: [PATCH 2/3] add PHP_MEMORY_LIMIT for composer to versions >7.2 Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com> --- 7.3/s2i/bin/assemble | 2 +- 7.4/s2i/bin/assemble | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/7.3/s2i/bin/assemble b/7.3/s2i/bin/assemble index 26c41b382..f6ce205ce 100755 --- a/7.3/s2i/bin/assemble +++ b/7.3/s2i/bin/assemble @@ -58,7 +58,7 @@ if [ -f composer.json ]; then fi # Install App dependencies using Composer - ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS + php -d memory_limit=$PHP_MEMORY_LIMIT ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS if [ ! -f composer.lock ]; then echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n" diff --git a/7.4/s2i/bin/assemble b/7.4/s2i/bin/assemble index 26c41b382..508a27ea8 100755 --- a/7.4/s2i/bin/assemble +++ b/7.4/s2i/bin/assemble @@ -58,7 +58,7 @@ if [ -f composer.json ]; then fi # Install App dependencies using Composer - ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS + php -d memory_limit=$PHP_MEMORY_LIMIT ./composer.phar./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS if [ ! -f composer.lock ]; then echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n" From 2417fe29a7de5c48f46844c9284f7df38801e4d7 Mon Sep 17 00:00:00 2001 From: PixelJonas <5434875+PixelJonas@users.noreply.github.com> Date: Mon, 6 Jun 2022 13:54:50 +0200 Subject: [PATCH 3/3] add fix to php8 Signed-off-by: PixelJonas <5434875+PixelJonas@users.noreply.github.com> --- 8.0/s2i/bin/assemble | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/8.0/s2i/bin/assemble b/8.0/s2i/bin/assemble index 26c41b382..f6ce205ce 100755 --- a/8.0/s2i/bin/assemble +++ b/8.0/s2i/bin/assemble @@ -58,7 +58,7 @@ if [ -f composer.json ]; then fi # Install App dependencies using Composer - ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS + php -d memory_limit=$PHP_MEMORY_LIMIT ./composer.phar install --no-interaction --no-ansi --optimize-autoloader $COMPOSER_ARGS if [ ! -f composer.lock ]; then echo -e "\nConsider adding a 'composer.lock' file into your source repository.\n"