Added expires apache mod + php settings
This commit is contained in:
parent
bddde74c50
commit
a75614edd7
20
Dockerfile
20
Dockerfile
|
|
@ -1,8 +1,8 @@
|
||||||
FROM php:7.2-apache
|
FROM php:7.2-apache
|
||||||
LABEL maintainer="Andy Miller <rhuk@getgrav.org> (@rhukster)"
|
LABEL maintainer="Andy Miller <rhuk@getgrav.org> (@rhukster)"
|
||||||
|
|
||||||
# Enable Apache Rewrite Module
|
# Enable Apache Rewrite + Expires Module
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite expires
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
|
|
@ -16,6 +16,22 @@ RUN apt-get update && apt-get install -y \
|
||||||
&& docker-php-ext-install -j$(nproc) gd \
|
&& docker-php-ext-install -j$(nproc) gd \
|
||||||
&& docker-php-ext-install zip
|
&& docker-php-ext-install zip
|
||||||
|
|
||||||
|
# set recommended PHP.ini settings
|
||||||
|
# see https://secure.php.net/manual/en/opcache.installation.php
|
||||||
|
RUN { \
|
||||||
|
echo 'opcache.memory_consumption=128'; \
|
||||||
|
echo 'opcache.interned_strings_buffer=8'; \
|
||||||
|
echo 'opcache.max_accelerated_files=4000'; \
|
||||||
|
echo 'opcache.revalidate_freq=2'; \
|
||||||
|
echo 'opcache.fast_shutdown=1'; \
|
||||||
|
echo 'opcache.enable_cli=1'; \
|
||||||
|
echo 'upload_max_filesize=128M'; \
|
||||||
|
echo 'post_max_size=128M'; \
|
||||||
|
} > /usr/local/etc/php/conf.d/php-recommended.ini
|
||||||
|
|
||||||
|
# provide container inside image for data persistance
|
||||||
|
# VOLUME /var/www/html
|
||||||
|
|
||||||
RUN pecl install apcu \
|
RUN pecl install apcu \
|
||||||
&& pecl install yaml \
|
&& pecl install yaml \
|
||||||
&& docker-php-ext-enable apcu yaml
|
&& docker-php-ext-enable apcu yaml
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue