Skip to content

Commit eda105b

Browse files
committed
feat: auto max_accelerated_files
1 parent ad2548e commit eda105b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin/opcache-setup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
if [[ ${OPCACHE_ENABLED} == true ]]; then
44
echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
5+
echo "opcache.max_accelerated_files=$(echo $[ 1000 + $(find . -type f -name "*.php" | wc -l) ])" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
56
else
67
echo "opcache.enable=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
78
fi

0 commit comments

Comments
 (0)