]> git.openstreetmap.org Git - chef.git/commitdiff
Run the rails message delivery script in production mode
authorTom Hughes <tom@compton.nu>
Wed, 17 Jul 2019 23:21:11 +0000 (00:21 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 17 Jul 2019 23:23:13 +0000 (00:23 +0100)
cookbooks/exim/templates/default/exim4.conf.erb
roles/web-frontend.rb

index 7e89a1e931a103fe1a38602e94b3d5c8bedfb239..0a4f1d04f249c3b4bde08863dddac8ffb701f80a 100644 (file)
@@ -732,6 +732,9 @@ noreply:
   command = <%= details[:command] %>
   home_directory = <%= details[:home_directory] %>
   path = <%= details[:path] || "/bin:/usr/bin" %>
+<% if details[:environment] -%>
+  environment = <%= details[:environment].map { |k,v| "#{k}=#{v}" }.join(":") %>
+<% end -%>
   return_fail_output
 <% else -%>
   driver = appendfile
index 741a40b901e3cf3db3dbc7f7b461c9c13c99a66b..0435872dd1c751b166465f04f34d76e702c9aa29 100644 (file)
@@ -37,7 +37,10 @@ default_attributes(
         :user => "rails",
         :group => "rails",
         :home_directory => "/srv/www.openstreetmap.org/rails",
-        :path => "/bin:/usr/bin:/usr/local/bin"
+        :path => "/bin:/usr/bin:/usr/local/bin",
+        :environment => {
+          "RAILS_ENV" => "production"
+        }
       }
     }
   }