]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/recipes/default.rb
Bump cookstyle from 6.15.5 to 6.15.9
[chef.git] / cookbooks / nominatim / recipes / default.rb
index f0a365c09666f42129e9ca7fd9f31ec0a8348f90..e0a7870d5511d36b2bafc618ac2fe9daf178628d 100644 (file)
@@ -174,6 +174,7 @@ package %w[
 
 source_directory = "#{basedir}/nominatim"
 build_directory = "#{basedir}/bin"
 
 source_directory = "#{basedir}/nominatim"
 build_directory = "#{basedir}/bin"
+ui_directory = "#{basedir}/ui"
 
 directory build_directory do
   owner "nominatim"
 
 directory build_directory do
   owner "nominatim"
@@ -226,6 +227,21 @@ template "#{build_directory}/settings/local.php" do
             :log_file => "#{node[:nominatim][:logdir]}/query.log"
 end
 
             :log_file => "#{node[:nominatim][:logdir]}/query.log"
 end
 
+git ui_directory do
+  action :sync
+  repository node[:nominatim][:ui_repository]
+  revision node[:nominatim][:ui_revision]
+  user "nominatim"
+  group "nominatim"
+end
+
+template "#{ui_directory}/dist/config.js" do
+  source "ui-config.js.erb"
+  owner "nominatim"
+  group "nominatim"
+  mode "664"
+end
+
 if node[:nominatim][:flatnode_file]
   directory File.dirname(node[:nominatim][:flatnode_file]) do
     recursive true
 if node[:nominatim][:flatnode_file]
   directory File.dirname(node[:nominatim][:flatnode_file]) do
     recursive true
@@ -364,9 +380,14 @@ end
 end
 
 node[:nominatim][:fpm_pools].each do |name, data|
 end
 
 node[:nominatim][:fpm_pools].each do |name, data|
-  php_fpm name do
-    template "fpm.conf.erb"
-    variables data.merge(:name => name)
+  php_fpm name.to_s do
+    port data[:port]
+    pm data[:pm]
+    pm_max_children data[:max_children]
+    pm_start_servers 20
+    pm_min_spare_servers 10
+    pm_max_spare_servers 20
+    pm_max_requests 10000
   end
 end
 
   end
 end
 
@@ -396,7 +417,8 @@ nginx_site "nominatim" do
   directory build_directory
   variables :pools => node[:nominatim][:fpm_pools],
             :frontends => search(:node, "recipes:web\\:\\:frontend"),
   directory build_directory
   variables :pools => node[:nominatim][:fpm_pools],
             :frontends => search(:node, "recipes:web\\:\\:frontend"),
-            :confdir => "#{basedir}/etc"
+            :confdir => "#{basedir}/etc",
+            :ui_directory => ui_directory
 end
 
 template "/etc/logrotate.d/nginx" do
 end
 
 template "/etc/logrotate.d/nginx" do