Opcache.ini
This commit is contained in:
@@ -22,6 +22,12 @@ RUN apt-get update && apt-get install -y \
|
|||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Habilita e configura OPcache
|
||||||
|
RUN docker-php-ext-install opcache
|
||||||
|
|
||||||
|
# Arquivo customizado de configuração do PHP com OPcache otimizado
|
||||||
|
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||||
|
|
||||||
# Define diretório de trabalho padrão
|
# Define diretório de trabalho padrão
|
||||||
WORKDIR /var/www/html
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
@@ -33,9 +39,6 @@ RUN echo "DirectoryIndex login.php index.php" > /etc/apache2/conf-available/dire
|
|||||||
COPY app.zip /var/www/html/
|
COPY app.zip /var/www/html/
|
||||||
RUN unzip -o app.zip -d /var/www/html && rm app.zip
|
RUN unzip -o app.zip -d /var/www/html && rm app.zip
|
||||||
|
|
||||||
# Substitui o diretório /files por um link simbólico (volume externo opcional)
|
|
||||||
# RUN rm -rf /var/www/html/files && ln -s /files /var/www/html/files
|
|
||||||
|
|
||||||
# Permissões para o Apache
|
# Permissões para o Apache
|
||||||
RUN chown -R www-data:www-data /var/www/html
|
RUN chown -R www-data:www-data /var/www/html
|
||||||
|
|
||||||
|
|||||||
8
opcache.ini
Normal file
8
opcache.ini
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
; Habilita o OPcache
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.memory_consumption=128
|
||||||
|
opcache.interned_strings_buffer=8
|
||||||
|
opcache.max_accelerated_files=10000
|
||||||
|
opcache.revalidate_freq=60
|
||||||
|
opcache.validate_timestamps=1
|
||||||
Reference in New Issue
Block a user