shinsenter / php

📦 Simplified PHP Docker images for effortless customization and extension setup. Our Docker images cover PHP versions from 5.6 to 8.4, available in CLI, ZTS, FPM, FPM/Apache2, FPM/Nginx, RoadRunner, FrankenPHP, and Nginx Unit variants, for both Debian and Alpine versions. Updated everyday.
https://hub.docker.com/r/shinsenter/php
GNU General Public License v3.0
124 stars 27 forks source link

ENV variable to set Unit processes max and spare #148

Closed miscs closed 2 weeks ago

miscs commented 2 weeks ago

Hi,

thank you for all the hard work! For FPM I understand how to set PM_MAX_CHILDREN and other related settings by ENV. But how to set processes.max and processes.spare for Nginx Unit server? Is there also a ENV for this?

Thanks!

shinsenter commented 2 weeks ago

Hi @miscs,

Thank you for your question.

The Docker images I provide for all variants mainly focus on simplifying the configuration for PHP and PHP-FPM. As for the included middleware (such as Nginx Unit), most of them use basic configurations.

To update the configurations according to your needs, you can refer to my sample JSON file below, make the necessary adjustments, and then copy or mount that JSON file into the /etc/unit/sites-enabled directory of the container. When the container starts, it will read the JSON files in /etc/unit/sites-enabled and load them into Nginx Unit.

https://github.com/shinsenter/php/blob/afec8b85e82035cc651e186598a44bb4f4a6695b/src/php/with-unit/rootfs/etc/unit/sites-enabled/00-default.json

I hope this information helps!