- port = 7000 + account["uid"].to_i
-
- template "/etc/php/7.2/fpm/pool.d/#{name}.conf" do
- source "fpm.conf.erb"
- owner "root"
- group "root"
- mode 0o644
- variables :user => name, :port => port
- notifies :reload, "service[php7.2-fpm]"
+ php_fpm name do
+ user name
+ group name
+ pm_max_children 10
+ pm_start_servers 4
+ pm_min_spare_servers 2
+ pm_max_spare_servers 6
+ pm_max_requests 10000
+ request_terminate_timeout 1800
+ environment "HOSTNAME" => "$HOSTNAME",
+ "PATH" => "/usr/local/bin:/usr/bin:/bin",
+ "TMP" => "/tmp",
+ "TMPDIR" => "/tmp",
+ "TEMP" => "/tmp"
+ php_values "max_execution_time" => "300",
+ "memory_limit" => "128M",
+ "post_max_size" => "32M",
+ "upload_max_filesize" => "32M"
+ php_admin_values "sendmail_path" => "/usr/sbin/sendmail -t -i -f #{name}@dev.openstreetmap.org",
+ "open_basedir" => "/home/#{name}/:/tmp/:/usr/share/php/"
+ php_flags "display_errors" => "on"