Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/roots/trellis
Browse files Browse the repository at this point in the history
  • Loading branch information
pacotole committed Jan 25, 2024
2 parents 543843f + 36c8491 commit 338a436
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/php/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ php_opcache_revalidate_freq: 60
php_opcache_validate_timestamps: 1
php_opcache_max_wasted_percentage: 5
php_opcache_huge_code_pages: 0
php_opcache_jit: 'tracing'
php_opcache_jit_buffer_size: 256M

php_fpm_set_emergency_restart_threshold: false
php_fpm_emergency_restart_threshold: 0
Expand Down
7 changes: 7 additions & 0 deletions roles/php/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
dest: /etc/php/{{ php_version }}/cli/php.ini
mode: '0644'

- name: Copy 10-opcache.ini configuration file
template:
src: 10-opcache.ini.j2
dest: /etc/php/{{ php_version }}/fpm/conf.d/10-opcache.ini
mode: '0644'
notify: reload php-fpm

- name: Change ImageMagick policy.xml to allow for PDFs
replace:
path: /etc/ImageMagick-6/policy.xml
Expand Down
6 changes: 6 additions & 0 deletions roles/php/templates/10-opcache.ini.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; {{ ansible_managed }}

; configuration for php opcache module
; priority=10
zend_extension=opcache.so
opcache.jit={{ php_opcache_jit }}
1 change: 1 addition & 0 deletions roles/php/templates/php-fpm.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ opcache.revalidate_freq = {{ php_opcache_revalidate_freq }}
opcache.fast_shutdown = {{ php_opcache_fast_shutdown }}
opcache.max_wasted_percentage = {{ php_opcache_max_wasted_percentage }}
opcache.huge_code_pages = {{ php_opcache_huge_code_pages }}
opcache.jit_buffer_size = {{ php_opcache_jit_buffer_size }}

0 comments on commit 338a436

Please sign in to comment.