Add memory limit to base container

This commit is contained in:
philipp lang 2024-01-28 21:53:54 +01:00
parent 631725c0f9
commit cc8428e6b8
3 changed files with 2 additions and 2 deletions

View File

@ -9,4 +9,5 @@ RUN pecl install redis && docker-php-ext-enable redis
RUN docker-php-ext-configure gd --with-jpeg RUN docker-php-ext-configure gd --with-jpeg
RUN docker-php-ext-enable gd RUN docker-php-ext-enable gd
RUN usermod -s /bin/bash www-data RUN usermod -s /bin/bash www-data
RUN echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/99-custom-php-memlimit.ini

View File

@ -37,7 +37,7 @@ fi
if [ $1 == "schedule" ]; then if [ $1 == "schedule" ]; then
wait_for_db wait_for_db
while true; do while true; do
su www-data -c 'php -d memory_limit=2G artisan schedule:run -n' su www-data -c 'php artisan schedule:run -n'
sleep 60 sleep 60
done done
fi fi

View File

@ -29,7 +29,6 @@ steps:
- name: tests - name: tests
image: zoomyboy/adrema-base:latest image: zoomyboy/adrema-base:latest
commands: commands:
- echo 'memory_limit = 2G' >> /usr/local/etc/php/conf.d/99-custom-php-memlimit.ini;
- php artisan migrate - php artisan migrate
- php artisan test - php artisan test
- rm -f .env - rm -f .env