From: Vincent Vanwaelscappel Date: Mon, 5 Jun 2023 10:21:55 +0000 (+0200) Subject: wip #5991 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f4158953dba81138952bbe03f74e6c55602a7a43;p=fluidbook_processfarm.git wip #5991 @0.5 --- diff --git a/Dockerfile b/Dockerfile index c1d4220..333570a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends gnupg \ less nano wget bash lynx COPY --from=composer:2 /usr/bin/composer /usr/bin/composer -COPY overrides.conf /etc/php/8.2/fpm/pool.d/z-overrides.conf COPY --chmod=755 startup /usr/bin/startup CMD exec /usr/bin/startup STOPSIGNAL SIGQUIT diff --git a/docker-compose.yml b/docker-compose.yml index 1a34499..b154345 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,8 @@ services: volumes: - './app/:/application/' - './ssh/:/root/.ssh/' + - './php/fpm.conf:/etc/php/8.2/fpm/pool.d/z-overrides.conf' + - './php/php.ini:/etc/php/8.2/fpm/conf.d/99-overrides.ini' ports: - '9457:9000' restart: unless-stopped diff --git a/overrides.conf b/overrides.conf deleted file mode 100644 index 37a1483..0000000 --- a/overrides.conf +++ /dev/null @@ -1,37 +0,0 @@ -[global] -; Override default pid file -pid = /run/php-fpm.pid - -; Avoid logs being sent to syslog -error_log = /proc/self/fd/2 - -; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop -; This helps avoiding 502's -process_control_timeout = 30 - -; Do not daemonize (eg send process to the background) -daemonize = no - -[www] -; Access from webserver container is via network, not socket file -listen = [::]:9000 - -; Redirect logs to stdout - FPM closes /dev/std* on startup -access.log = /proc/self/fd/1 -catch_workers_output = yes - -; Remove "pool www" decoration from log output (older phpdocker.io containers for php use sed for this) -decorate_workers_output = no - -; Required to allow config-by-environment -clear_env = no - -user = 33 -group = 33 - -pm = dynamic -pm.max_children = 80 -pm.start_servers = 24 -pm.min_spare_servers = 20 -pm.max_spare_servers = 40 -pm.max_requests = 1000 diff --git a/php/fpm.conf b/php/fpm.conf new file mode 100644 index 0000000..37a1483 --- /dev/null +++ b/php/fpm.conf @@ -0,0 +1,37 @@ +[global] +; Override default pid file +pid = /run/php-fpm.pid + +; Avoid logs being sent to syslog +error_log = /proc/self/fd/2 + +; Set this to php default's max_execution_time to allow children to stop gracefully when fpm is commanded to stop +; This helps avoiding 502's +process_control_timeout = 30 + +; Do not daemonize (eg send process to the background) +daemonize = no + +[www] +; Access from webserver container is via network, not socket file +listen = [::]:9000 + +; Redirect logs to stdout - FPM closes /dev/std* on startup +access.log = /proc/self/fd/1 +catch_workers_output = yes + +; Remove "pool www" decoration from log output (older phpdocker.io containers for php use sed for this) +decorate_workers_output = no + +; Required to allow config-by-environment +clear_env = no + +user = 33 +group = 33 + +pm = dynamic +pm.max_children = 80 +pm.start_servers = 24 +pm.min_spare_servers = 20 +pm.max_spare_servers = 40 +pm.max_requests = 1000 diff --git a/php/php.ini b/php/php.ini new file mode 100644 index 0000000..05ea61b --- /dev/null +++ b/php/php.ini @@ -0,0 +1,4 @@ +error_log = /proc/self/fd/2 +log_errors = 1 +memory_limit = 12G +max_input_vars = 1000000 \ No newline at end of file