diff --git a/docker/Dockerfile b/docker/Dockerfile index 04011c9c5..a26a6ebc4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -31,7 +31,7 @@ RUN echo "deb https://packages.repomanager.net/repo/repomanager-php/bookworm/mai RUN apt-get update -y # Install nginx and PHP 8.3 -RUN apt-get install nginx php8.3-fpm php8.3-cli php8.3-sqlite3 php8.3-xml php8.3-curl php8.3-yaml sqlite3 -y +RUN apt-get install nginx php8.3-fpm php8.3-cli php8.3-sqlite3 php8.3-xml php8.3-curl php8.3-yaml php8.3-opcache sqlite3 -y # Clone project in the container RUN git clone https://github.com/lbr38/repomanager.git /tmp/repomanager @@ -51,6 +51,7 @@ RUN rm -rf /etc/nginx/sites-enabled/default /var/www/html # Configure PHP RUN cp /tmp/repomanager/docker/config/php/www.conf /etc/php/8.3/fpm/pool.d/www.conf +RUN cp /tmp/repomanager/docker/config/php/opcache.ini /etc/php/8.3/mods-available/opcache.ini RUN sed -i "s/^upload_max_filesize.*$/upload_max_filesize = $max_upload_size/g" /etc/php/8.3/fpm/php.ini RUN sed -i "s/^post_max_size.*$/post_max_size = $max_upload_size/g" /etc/php/8.3/fpm/php.ini diff --git a/docker/config/php/opcache.ini b/docker/config/php/opcache.ini new file mode 100644 index 000000000..12c59e10d --- /dev/null +++ b/docker/config/php/opcache.ini @@ -0,0 +1,10 @@ +; configuration for php opcache module +; priority=10 +zend_extension=opcache.so +opcache.enable=1 +opcache.validate_timestamps=1 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.interned_strings_buffer=16 +opcache.jit=tracing +opcache.jit_buffer_size=64 \ No newline at end of file