From: Tom Hughes Date: Thu, 20 Aug 2020 18:06:05 +0000 (+0100) Subject: Switch embedded maps to use the fastly CDN X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/586b336d1a0694e30df05846adb641b5df710f71 Switch embedded maps to use the fastly CDN --- diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index caf20279f..fd484263e 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -113,6 +113,7 @@ rails_port "www.openstreetmap.org" do storage_configuration storage storage_service "aws" storage_url "https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com" + tile_cdn_url "https://cdn-fastly-test.tile.openstreetmap.org/{z}/{x}/{y}.png" end gem_package "bundler#{ruby_version}" do diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index f8ee4ca2e..2a6528cd1 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -73,6 +73,7 @@ property :diary_feed_delay, Integer property :storage_configuration, Hash, :default => {} property :storage_service, String, :default => "local" property :storage_url, String +property :tile_cdn_url, String action :create do package %W[ @@ -318,7 +319,8 @@ action :create do "trace_use_job_queue", "diary_feed_delay", "storage_service", - "storage_url" + "storage_url", + "tile_cdn_url" ).reject { |_k, v| v.nil? }.merge( "server_protocol" => "https", "server_url" => new_resource.site,