X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/311468161683c37f71eae1bbfe8086630c83755c..f2c5c9e904adce651c4cdb22df13b44b7ac2dc9c:/cookbooks/web/recipes/rails.rb?ds=sidebyside diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 457cd69ce..59e9abfb8 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -93,6 +93,12 @@ storage = { } } +db_host = if node[:web][:status] == "database_readonly" + node[:web][:readonly_database_host] + else + node[:web][:database_host] + end + rails_port "www.openstreetmap.org" do ruby ruby_version directory rails_directory @@ -100,20 +106,19 @@ rails_port "www.openstreetmap.org" do group "rails" repository "https://git.openstreetmap.org/public/rails.git" revision "live" - database_host node[:web][:database_host] + database_host db_host database_name "openstreetmap" database_username "rails" database_password db_passwords["rails"] email_from "OpenStreetMap " status node[:web][:status] messages_domain "messages.openstreetmap.org" - gpx_dir "/store/rails/gpx" - attachments_dir "/store/rails/attachments" log_path "#{node[:web][:log_directory]}/rails.log" logstash_path "#{node[:web][:log_directory]}/rails-logstash.log" memcache_servers node[:web][:memcached_servers] potlatch2_key web_passwords["potlatch2_key"] id_key web_passwords["id_key"] + id_application web_passwords["id_application"] oauth_key web_passwords["oauth_key"] oauth_application web_passwords["oauth_application"] piwik_configuration "location" => piwik[:location],