From: Tom Hughes Date: Wed, 17 Jul 2019 23:21:11 +0000 (+0100) Subject: Run the rails message delivery script in production mode X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/40836bb2a0d4d9462d746c78d5084e1c9379bae9 Run the rails message delivery script in production mode --- diff --git a/cookbooks/exim/templates/default/exim4.conf.erb b/cookbooks/exim/templates/default/exim4.conf.erb index 7e89a1e93..0a4f1d04f 100644 --- a/cookbooks/exim/templates/default/exim4.conf.erb +++ b/cookbooks/exim/templates/default/exim4.conf.erb @@ -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 diff --git a/roles/web-frontend.rb b/roles/web-frontend.rb index 741a40b90..0435872dd 100644 --- a/roles/web-frontend.rb +++ b/roles/web-frontend.rb @@ -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" + } } } }