]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/web/recipes/rails.rb
Merge remote-tracking branch 'tigerfell/pr257'
[chef.git] / cookbooks / web / recipes / rails.rb
index 44ce2a4cdc12ed315be2d1ab80982cffc4ac860b..c60655f9e74a797856a4d09211781f891b099250 100644 (file)
@@ -52,7 +52,7 @@ end
 
 rails_directory = "#{node[:web][:base_directory]}/rails"
 
-piwik = data_bag_item("web", "piwik")
+matomo = data_bag_item("web", "matomo")
 
 storage = {
   "avatars" => {
@@ -120,9 +120,9 @@ rails_port "www.openstreetmap.org" do
   id_application web_passwords["id_application"]
   oauth_key web_passwords["oauth_key"]
   oauth_application web_passwords["oauth_application"]
-  piwik_configuration "location" => piwik[:location],
-                      "site" => piwik[:site],
-                      "goals" => piwik[:goals].to_hash
+  matomo_configuration "location" => matomo[:location],
+                       "site" => matomo[:site],
+                       "goals" => matomo[:goals].to_hash
   google_auth_id "651529786092-6c5ahcu0tpp95emiec8uibg11asmk34t.apps.googleusercontent.com"
   google_auth_secret web_passwords["google_auth_secret"]
   google_openid_realm "https://www.openstreetmap.org"
@@ -155,7 +155,7 @@ systemd_service "rails-jobs@" do
   environment "RAILS_ENV" => "production", "QUEUE" => "%I"
   user "rails"
   working_directory rails_directory
-  exec_start "#{node[:ruby][:bundle]} exec rake jobs:work"
+  exec_start "#{node[:ruby][:bundle]} exec rails jobs:work"
   restart "on-failure"
   private_tmp true
   private_devices true
@@ -173,8 +173,13 @@ template "/usr/local/bin/cleanup-rails-assets" do
   mode "755"
 end
 
-gem_package "apachelogregex"
-gem_package "file-tail"
+gem_package "apachelogregex" do
+  gem_binary node[:ruby][:gem]
+end
+
+gem_package "file-tail" do
+  gem_binary node[:ruby][:gem]
+end
 
 template "/usr/local/bin/api-statistics" do
   source "api-statistics.erb"
@@ -204,7 +209,9 @@ service "api-statistics" do
   subscribes :restart, "systemd_service[api-statistics]"
 end
 
-gem_package "hpricot"
+gem_package "hpricot" do
+  gem_binary node[:ruby][:gem]
+end
 
 munin_plugin "api_calls_status"
 munin_plugin "api_calls_num"