Commit c86b0b70 authored by Dave Lane's avatar Dave Lane

updating to php7.2-fpm-stretch

parent 55ff8f1f
......@@ -8,7 +8,7 @@ services:
networks:
default:
aliases:
- redis.grav.nzoss.nz
- redis.grav.stampy
app:
image: kiwilightweight/grav
links:
......@@ -20,7 +20,7 @@ services:
networks:
default:
aliases:
- grav.nzoss.nz
- grav.stampy
nginx:
image: oeru/nginx-jessie
links:
......@@ -36,4 +36,4 @@ services:
networks:
default:
aliases:
- nginx.grav.nzoss.nz
- nginx.grav.stampy
FROM php:7.0-fpm-jessie
FROM php:7-fpm-stretch
MAINTAINER Dave Lane <dave@oerfoundation.org> (@lightweight)
RUN apt-get update && apt-get install -y software-properties-common apt-utils
......@@ -48,51 +48,50 @@ RUN docker-php-ext-enable apcu
RUN rm -rf /var/lib/apt/lists/*
# address app-specific config requirements
RUN echo "log_errors = on" > /usr/local/etc/php/conf.d/php.ini
RUN echo "display_errors = off" >> /usr/local/etc/php/conf.d/php.ini
RUN echo "always_populate_raw_post_data = -1" >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'date.timezone = "Pacific/Auckland"' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'cgi.fix_pathinfo = 0' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'sendmail_path = /usr/bin/msmtp -t' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'upload_max_filesize = 100M' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'post_max_size = 150M' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'memory_limit = 250M' >> /usr/local/etc/php/conf.d/php.ini
# OpCache work
RUN echo '[opcache]' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.enable = 1' >> /usr/local/etc/php/conf.d/php.ini
#RUN echo 'opcache.enable_cli = 1' >> /usr/local/etc/php/conf.d/php.ini
#RUN echo 'opcache.interned_strings_buffer = 8' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.memory_consumption = 128' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.max_accelerated_files = 8000' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.revalidate_freq = 60' >> /usr/local/etc/php/conf.d/php.ini
#RUN echo 'opcache.fast_shutdown = 1' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.use_cwd = 1' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.validate_timestamps = 1' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.save_comments = 1' >> /usr/local/etc/php/conf.d/php.ini
RUN echo 'opcache.enable_file_override = 0' >> /usr/local/etc/php/conf.d/php.ini
RUN set -ex \
&& { \
echo 'log_errors = on'; \
echo 'display_errors = off'; \
echo 'always_populate_raw_post_data = -1'; \
echo 'date.timezone = "Pacific/Auckland"'; \
echo 'cgi.fix_pathinfo = 0'; \
echo 'sendmail_path = /usr/bin/msmtp -t'; \
echo 'upload_max_filesize = 100M'; \
echo 'post_max_size = 150M'; \
echo 'memory_limit = 250M'; \
echo '[opcache]'; \
echo 'opcache.enable = 1'; \
echo 'opcache.memory_consumption = 128'; \
echo 'opcache.max_accelerated_files = 8000'; \
echo 'opcache.revalidate_freq = 60'; \
echo 'opcache.use_cwd = 1'; \
echo 'opcache.validate_timestamps = 1'; \
echo 'opcache.save_comments = 1'; \
echo 'opcache.enable_file_override = 0'; \
} | tee /usr/local/etc/php/conf.d/php.ini
# the PHP-fpm configuration - create new www.conf file!
RUN echo '[global]' > /usr/local/etc/php-fpm.d/www.conf
RUN echo 'error_log = /proc/self/fd/2' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '[www]' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'user = www-data' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'group = www-data' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '; if we send this to /proc/self/fd/1, it never appears' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'access.log = /proc/self/fd/2' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'clear_env = no' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'catch_workers_output = yes' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '; Ensure worker stdout and stderr are sent to the main error log.' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'security.limit_extensions = .php' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo '; process management stuff' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm = ondemand' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.max_children = 10' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.start_servers = 2' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.min_spare_servers = 1' >> /usr/local/etc/php-fpm.d/www.conf
RUN echo 'pm.max_spare_servers = 3' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_flag[display_errors] = off' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_admin_value[error_log] = /usr/local/var/log/fpm-php.www.log' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_admin_flag[log_errors] = on' >> /usr/local/etc/php-fpm.d/www.conf
#RUN echo 'php_admin_value[memory_limit] = 250M' >> /usr/local/etc/php-fpm.d/www.conf
RUN set -ex \
&& { \
echo '[global]'; \
echo 'error_log = /proc/self/fd/2'; \
echo '[www]'; \
echo 'user = www-data'; \
echo 'group = www-data'; \
echo '; if we send this to /proc/self/fd/1, it never appears'; \
echo 'access.log = /proc/self/fd/2'; \
echo 'clear_env = no'; \
echo 'catch_workers_output = yes'; \
echo '; Ensure worker stdout and stderr are sent to the main error log.'; \
echo 'security.limit_extensions = .php'; \
echo '; process management stuff'; \
echo 'pm = ondemand'; \
echo 'pm.max_children = 10'; \
echo 'pm.start_servers = 2'; \
echo 'pm.min_spare_servers = 1'; \
echo 'pm.max_spare_servers = 3'; \
} | tee /usr/local/etc/php-fpm.d/www.conf
VOLUME /var/www/html
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment