gitlab-ci-pipeline-php
gitlab-ci-pipeline-php copied to clipboard
Possible to use more than 512MB of memory
Hey there,
I love this image as it makes CI/CD for Laravel super easy so thank you for investing your own time on creating and maintaining it!! I'm trying to update my CI/CD process from using PHP w/ Xdebug to just using phpdbg which seems to run much quicker with the tradeoff being higher memory usage, but since your build script limits the memory usage to 512M (https://github.com/edbizarro/gitlab-ci-pipeline-php/blob/master/php/scripts/extensions.sh#L135), it fails quite quickly. Would it be possible to add a tag that allows more memory usage, like 4GB?
Thank you again!
Hi @nexxai
Thanks for using my images!
Here a workaround until I find a way to change the .ini at runtime.
image: edbizarro/gitlab-ci-pipeline-php:7.4
cache:
paths:
- vendor/
test:
script:
- php -r "echo ini_get('memory_limit');";
- cat /usr/local/etc/php/conf.d/zz-conf.ini
- sudo rm -rf /usr/local/etc/php/conf.d/zz-conf.ini
- echo "memory_limit=4G" | sudo tee -a /usr/local/etc/php/conf.d/zz-conf.ini
- php -r "echo ini_get('memory_limit');";
Awesome, thank you so much!
FWIW, I'm using phpdbg as well and I just run the command like phpdbg -d memory_limit=1024M -qrr vendor/bin/phpunit --config=phpunit.xml.dist