From: Tom Hughes Date: Sun, 29 Nov 2020 12:05:51 +0000 (+0000) Subject: Use string names and unix domain sockets for nominatim FPM pools X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/f61fef8f4ef75e9fc9a6a0421b9e3c5304c79784?ds=sidebyside Use string names and unix domain sockets for nominatim FPM pools --- diff --git a/cookbooks/nominatim/attributes/default.rb b/cookbooks/nominatim/attributes/default.rb index 4e74848cd..bf87600ba 100644 --- a/cookbooks/nominatim/attributes/default.rb +++ b/cookbooks/nominatim/attributes/default.rb @@ -13,8 +13,7 @@ default[:nominatim][:ui_repository] = "https://github.com/osm-search/nominatim-u default[:nominatim][:ui_revision] = "master" default[:nominatim][:fpm_pools] = { - :www => { - :port => 8000, + "nominatim.openstreetmap.org" => { :pm => "dynamic", :max_children => 60, :prometheus_port => 9253 diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index 42989db71..b5496a652 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -380,7 +380,7 @@ end end node[:nominatim][:fpm_pools].each do |name, data| - php_fpm name.to_s do + php_fpm name do port data[:port] pm data[:pm] pm_max_children data[:max_children] diff --git a/cookbooks/nominatim/templates/default/nginx.erb b/cookbooks/nominatim/templates/default/nginx.erb index 88bd3c909..a44e9382c 100644 --- a/cookbooks/nominatim/templates/default/nginx.erb +++ b/cookbooks/nominatim/templates/default/nginx.erb @@ -1,5 +1,5 @@ upstream nominatim_service { - server 127.0.0.1:<%= @pools[:www][:port ]%>; + server unix:/run/php/nominatim.openstreetmap.org.sock; } map $uri $nominatim_script_name {