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

feat(docker): update PHP-FPM config #291

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions infra/docker/api/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ access.log = /dev/null
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 40
pm.max_children = 80

; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: (min_spare_servers + max_spare_servers) / 2
pm.start_servers = 4
pm.start_servers = 8

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 2
pm.min_spare_servers = 4

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 4
pm.max_spare_servers = 8
3 changes: 0 additions & 3 deletions infra/docker/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ RUN apk add --no-cache icu-dev \
# PHP config file
COPY ./php.ini ${PHP_INI_DIR}/conf.d/zzzz-php.ini

# PHP-FPM config file
COPY php-fpm.conf /usr/local/etc/php-fpm.d/zzzz-www.conf

EXPOSE 8080

FROM cli AS production
Expand Down
29 changes: 0 additions & 29 deletions infra/docker/cli/php-fpm.conf

This file was deleted.

8 changes: 4 additions & 4 deletions infra/docker/internal/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ access.log = /dev/null
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 40
pm.max_children = 80

; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: (min_spare_servers + max_spare_servers) / 2
pm.start_servers = 4
pm.start_servers = 8

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 2
pm.min_spare_servers = 4

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 4
pm.max_spare_servers = 8
8 changes: 4 additions & 4 deletions infra/docker/selfserve/php-fpm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ access.log = /dev/null
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 40
pm.max_children = 80

; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: (min_spare_servers + max_spare_servers) / 2
pm.start_servers = 4
pm.start_servers = 8

; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 2
pm.min_spare_servers = 4

; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 4
pm.max_spare_servers = 8
6 changes: 3 additions & 3 deletions infra/terraform/environments/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module "service" {

services = {
"api" = {
cpu = 1024
cpu = 2048
memory = 4096

version = var.api_image_tag
Expand All @@ -168,7 +168,7 @@ module "service" {
}

"internal" = {
cpu = 1024
cpu = 2048
memory = 4096

version = var.internal_image_tag
Expand Down Expand Up @@ -208,7 +208,7 @@ module "service" {
}

"selfserve" = {
cpu = 1024
cpu = 2048
memory = 4096

version = var.selfserve_image_tag
Expand Down
6 changes: 3 additions & 3 deletions infra/terraform/environments/int/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module "service" {

services = {
"api" = {
cpu = 1024
cpu = 2048
memory = 4096

version = var.api_image_tag
Expand All @@ -168,7 +168,7 @@ module "service" {
}

"internal" = {
cpu = 1024
cpu = 2048
memory = 4096

version = var.internal_image_tag
Expand Down Expand Up @@ -208,7 +208,7 @@ module "service" {
}

"selfserve" = {
cpu = 1024
cpu = 2048
memory = 4096

version = var.selfserve_image_tag
Expand Down