If you want to set the PHP memory limit and/or max execution time to something other than the default, you can do this in your container during build. Use following in your Dockerfile:
1 2 3 4 |
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini && \ sed -i -e "s/^ *memory_limit.*/memory_limit = 4G/g" -e "s/^ *max_execution_time.*/max_execution_time = 0/g" /usr/local/etc/php/php.ini |
The RUN commands above will copy the default production ini file, and then will modify the memory_limit and set it to 4 gigabytes in the ini file. It also sets the max_execution_time to zero, meaning there is no max.