Commit 80e79719 authored by mh's avatar mh
Browse files

make it possible to set various settings

parent e5989108
......@@ -7,6 +7,7 @@ define php::fpm(
Stdlib::Compat::Absolute_Path $tmpdir = "/var/www/vhosts/${name}/tmp/tmp",
Hash $additional_envs = {},
Hash $php_settings = {},
Hash $fpm_settings = {},
String $run_user = "${name}_run",
String $run_group = $name,
Array[Stdlib::Compat::Absolute_Path]
......@@ -44,6 +45,7 @@ define php::fpm(
if $ensure == 'present' {
include ::php::fpm::base
$real_fpm_settings = $php::fpm::base::settings + $fpm_settings
File[ "${etcdir}/php-fpm.d/${name}.conf"]{
group => $run_group,
}
......
# fpm base stuff
class php::fpm::base(
String $on_calendar = '*:0/30',
Hash $settings = {
'pm' => 'ondemand',
'pm.max_children' => '10',
'pm.process_idle_timeout' => '30s',
},
) {
file{
'/usr/local/sbin/fpm-kill-pool.sh':
......
......@@ -5,8 +5,9 @@ daemonize = no
[<%= @name %>-0]
listen = /run/fpm-<%= @name %>-socket/0.socket
pm = ondemand
pm.max_children = 10
<% @real_fpm_settings.keys.sort.each do |k| -%>
<%= k %> = <%= @real_fpm_settings[v] %>
<% end -%>
slowlog = <%= @logdir %>/fpm-slow-0.log
env[TMP] = <%= @tmpdir %>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment