]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/resources/rails_port.rb
Increase interval and timeout for statuscake monitoring
[chef.git] / cookbooks / web / resources / rails_port.rb
index 1524964d0b6e030bd4c6a53784ad9388097c4b18..16402d243043fb5c724516363fd17ceee541fd93 100644 (file)
@@ -70,7 +70,7 @@ property :thunderforest_key, String
 property :totp_key, String
 property :csp_enforce, [true, false], :default => false
 property :csp_report_url, String
 property :totp_key, String
 property :csp_enforce, [true, false], :default => false
 property :csp_report_url, String
-property :piwik_configuration, Hash
+property :matomo_configuration, Hash
 property :storage_service, String, :default => "local"
 property :storage_url, String
 property :trace_use_job_queue, [true, false], :default => false
 property :storage_service, String, :default => "local"
 property :storage_url, String
 property :trace_use_job_queue, [true, false], :default => false
@@ -88,6 +88,7 @@ property :tile_cdn_url, String
 action :create do
   package %W[
     imagemagick
 action :create do
   package %W[
     imagemagick
+    libvips42
     nodejs
     tzdata
   ]
     nodejs
     tzdata
   ]
@@ -354,6 +355,10 @@ action :create do
     settings["gpx_image_dir"] = "#{new_resource.gpx_dir}/images"
   end
 
     settings["gpx_image_dir"] = "#{new_resource.gpx_dir}/images"
   end
 
+  if new_resource.matomo_configuration
+    settings["matomo"] = new_resource.matomo_configuration.to_h
+  end
+
   file "#{rails_directory}/config/settings.local.yml" do
     owner new_resource.user
     group new_resource.group
   file "#{rails_directory}/config/settings.local.yml" do
     owner new_resource.user
     group new_resource.group
@@ -376,17 +381,8 @@ action :create do
     content YAML.dump(storage_configuration)
   end
 
     content YAML.dump(storage_configuration)
   end
 
-  if new_resource.piwik_configuration
-    file "#{rails_directory}/config/piwik.yml" do
-      owner new_resource.user
-      group new_resource.group
-      mode "664"
-      content YAML.dump(new_resource.piwik_configuration)
-    end
-  else
-    file "#{rails_directory}/config/piwik.yml" do
-      action :delete
-    end
+  file "#{rails_directory}/config/piwik.yml" do
+    action :delete
   end
 
   bundle_install "#{rails_directory}" do
   end
 
   bundle_install "#{rails_directory}" do
@@ -447,7 +443,6 @@ action :create do
     subscribes :run, "file[create:#{rails_directory}/config/application.yml]"
     subscribes :run, "file[#{rails_directory}/config/settings.local.yml]"
     subscribes :run, "file[#{rails_directory}/config/storage.yml]"
     subscribes :run, "file[create:#{rails_directory}/config/application.yml]"
     subscribes :run, "file[#{rails_directory}/config/settings.local.yml]"
     subscribes :run, "file[#{rails_directory}/config/storage.yml]"
-    subscribes :run, "file[#{rails_directory}/config/piwik.yml]"
     subscribes :run, "bundle_exec[#{rails_directory}/package.json]"
     subscribes :run, "bundle_exec[#{rails_directory}/app/assets/javascripts/i18n]"
     only_if { new_resource.build_assets }
     subscribes :run, "bundle_exec[#{rails_directory}/package.json]"
     subscribes :run, "bundle_exec[#{rails_directory}/app/assets/javascripts/i18n]"
     only_if { new_resource.build_assets }
@@ -466,7 +461,6 @@ action :create do
     subscribes :restart, "file[create:#{rails_directory}/config/application.yml]"
     subscribes :restart, "file[#{rails_directory}/config/settings.local.yml]"
     subscribes :restart, "file[#{rails_directory}/config/storage.yml]"
     subscribes :restart, "file[create:#{rails_directory}/config/application.yml]"
     subscribes :restart, "file[#{rails_directory}/config/settings.local.yml]"
     subscribes :restart, "file[#{rails_directory}/config/storage.yml]"
-    subscribes :restart, "file[#{rails_directory}/config/piwik.yml]"
     subscribes :restart, "bundle_installl[#{rails_directory}]"
     subscribes :restart, "bundle_exec[#{rails_directory}/db/migrate]"
     subscribes :restart, "bundle_exec[#{rails_directory}/package.json]"
     subscribes :restart, "bundle_installl[#{rails_directory}]"
     subscribes :restart, "bundle_exec[#{rails_directory}/db/migrate]"
     subscribes :restart, "bundle_exec[#{rails_directory}/package.json]"