Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of FPM settings via PHP_FPM_OVERRIDE #36

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

baschny
Copy link
Member

@baschny baschny commented Aug 16, 2023

Use PHP_FPM_OVERRIDE to override the default php-fpm.conf settings (see https://www.php.net/manual/en/install.fpm.configuration.php).

Default is:

user = application
group = application
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /status

Override for example like this:

PHP_FPM_OVERRIDE="
slowlog = /tmp/slow.log
request_slowlog_timeout = 3s
pm.max_children = 15
"

Or if your system doesn't support multiline ENV (i.e. ECS):

PHP_FPM_OVERRIDE="slowlog = /tmp/slow.log\nrequest_slowlog_timeout = 3s\npm.max_children = 15"

Use PHP_FPM_OVERRIDE for example:

PHP_FPM_OVERRIDE="
slowlog = /tmp/slow.log
request_slowlog_timeout = 3s
pm.max_children = 15
"

Or if your system doesn't support multiline ENV (i.e. ECS):
PHP_FPM_OVERRIDE="slowlog = /tmp/slow.log\nrequest_slowlog_timeout = 3s\npm.max_children = 15"
@@ -19,15 +19,15 @@ services:
- example-app.vm

php:
image: croneu/phpapp-fpm:php-7.4
image: croneu/phpapp-fpm:php-8.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not intended for this PR, but the upgrade in the example is ok...

@baschny baschny merged commit 0a98ecd into master Aug 16, 2023
0 of 6 checks passed
@baschny baschny deleted the php-fpm-customization branch August 16, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant