From 55547db6ce691a71d19a502178c2a9e00a303dd5 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Thu, 30 Nov 2017 16:47:52 -0800 Subject: Improve docker build to use hooks --- docker/etc/php7/conf.d/local.ini | 15 +++++++++++++++ docker/etc/php7/php-fpm.conf | 19 +++++++++++++++++++ docker/etc/php7/php-fpm.d/env.conf | 3 +++ 3 files changed, 37 insertions(+) create mode 100644 docker/etc/php7/conf.d/local.ini create mode 100644 docker/etc/php7/php-fpm.conf create mode 100644 docker/etc/php7/php-fpm.d/env.conf (limited to 'docker/etc/php7') diff --git a/docker/etc/php7/conf.d/local.ini b/docker/etc/php7/conf.d/local.ini new file mode 100644 index 00000000..0c1795f2 --- /dev/null +++ b/docker/etc/php7/conf.d/local.ini @@ -0,0 +1,15 @@ +expose_php = Off +error_reporting = E_ALL +display_errors = Off +log_errors = On +error_log = /dev/stderr +date.timezone = UTC +allow_url_fopen = On +post_max_size = 32M +upload_max_filesize = 32M +opcache.max_accelerated_files = 7963 +opcache.validate_timestamps = Off +opcache.save_comments = 0 +opcache.load_comments = 0 +opcache.fast_shutdown = 1 +opcache.enable_file_override = On diff --git a/docker/etc/php7/php-fpm.conf b/docker/etc/php7/php-fpm.conf new file mode 100644 index 00000000..ea227529 --- /dev/null +++ b/docker/etc/php7/php-fpm.conf @@ -0,0 +1,19 @@ +[global] +error_log = /proc/self/fd/2 +log_level = error +daemonize = no + +[www] +catch_workers_output = yes +user = nginx +group = nginx +listen.owner = nginx +listen.group = nginx +listen = /var/run/php-fpm.sock +pm = dynamic +pm.max_children = 20 +pm.start_servers = 1 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +pm.max_requests = 2048 +include = /etc/php7/php-fpm.d/env.conf \ No newline at end of file diff --git a/docker/etc/php7/php-fpm.d/env.conf b/docker/etc/php7/php-fpm.d/env.conf new file mode 100644 index 00000000..23f6ce3d --- /dev/null +++ b/docker/etc/php7/php-fpm.d/env.conf @@ -0,0 +1,3 @@ +env[DATABASE_URL] = $DATABASE_URL +env[DEBUG] = $DEBUG +env[API_AUTHENTICATION_TOKEN] = $API_AUTHENTICATION_TOKEN -- cgit v1.2.3