Skip to content

Docker / Podman

The NEOGAGE application is provided with a decent configuration that performs well in almost all situations. However, in large installations it may be required to customise the configuration to your requirements.

The tuning can be done by creating secrets that hold the new custom configurations that you require, be it for PHP or Apache. The location and files that can be modified are as below:

ConfigurationFile Location
PHP-FPM Settings/etc/php84/php-fpm.d/www.conf
PHP Main configuration/etc/php84/php.ini
Apache MPM Configuration/etc/apache2/conf.d/mpm.conf

An example below is given for tuning PHP-FPM. In this example, the following configuration will be used:

[www]
listen = 127.0.0.1:9000
pm = static
pm.max_children = 50
pm.start_servers = 4
pm.min_spare_servers = 4
pm.max_spare_servers = 8
pm.process_idle_timeout = 10s;
pm.max_requests = 3000

The above configuration is saved in a file called www.conf and this can then be used to create a secret:

Terminal window
docker secret create php-fpm-www-conf www.conf

To utilise this configuration, we need to append it to the command when running the docker service or podman run commands. So we append the below to that command:

Terminal window
--secret source=php-fpm-www-conf,target=/etc/php83/php-fpm.d/www.conf

the NEOGAGE application container will now mount the secret to the target location and utilise the new custom configuration that we have created. The above can be adjusted accordingly for any of the remaining configuration files listed earlier in this documentation.