diff --git a/config/initializers/decidim.rb b/config/initializers/decidim.rb index 178aba01a..687b466c1 100644 --- a/config/initializers/decidim.rb +++ b/config/initializers/decidim.rb @@ -109,15 +109,16 @@ # cache_prefix: "..." # } if Rails.application.secrets.maps.present? && Rails.application.secrets.maps[:static_provider].present? + provider = Rails.application.secrets.maps[:provider] static_provider = Rails.application.secrets.maps[:static_provider] dynamic_provider = Rails.application.secrets.maps[:dynamic_provider] dynamic_url = Rails.application.secrets.maps[:dynamic_url] static_url = Rails.application.secrets.maps[:static_url] static_url = "https://image.maps.ls.hereapi.com/mia/1.6/mapview" if static_provider == "here" && static_url.blank? config.maps = { - provider: static_provider, + provider: provider, api_key: Rails.application.secrets.maps[:static_api_key], - static: { url: static_url }, + static: { provider: static_provider, url: static_url }, dynamic: { provider: dynamic_provider, api_key: Rails.application.secrets.maps[:dynamic_api_key] diff --git a/config/puma.rb b/config/puma.rb index d6c559998..0da73d3af 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -43,7 +43,7 @@ # Workers do not work on JRuby or Windows (both of which do not support # processes). # -workers ENV.fetch("WEB_CONCURRENCY", 2) +workers ENV.fetch("WEB_CONCURRENCY", 2) unless Rails.env.development? # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code diff --git a/config/secrets.yml b/config/secrets.yml index d78e63644..9be026907 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -149,6 +149,7 @@ default: &default here_api_key: <%= ENV["GEOCODER_API_KEY"] %> maps: api_key: <%= ENV["MAPS_API_KEY"] %> + provider: <%= ENV["MAPS_PROVIDER"] %> dynamic_provider: <%= Decidim::Env.new("MAPS_DYNAMIC_PROVIDER", ENV["MAPS_PROVIDER"]).to_s %> static_provider: <%= Decidim::Env.new("MAPS_STATIC_PROVIDER", ENV["MAPS_PROVIDER"]).to_s %> static_api_key: <%= Decidim::Env.new("MAPS_STATIC_API_KEY", ENV["MAPS_API_KEY"]).to_s %>