]> git.openstreetmap.org Git - chef.git/commitdiff
Merge remote-tracking branch 'github/pull/378'
authorTom Hughes <tom@compton.nu>
Wed, 30 Dec 2020 10:03:49 +0000 (10:03 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 30 Dec 2020 10:03:49 +0000 (10:03 +0000)
Gemfile.lock
cookbooks/imagery/templates/default/imagery.js.erb
cookbooks/tile/recipes/default.rb
cookbooks/tile/templates/default/cleanup-tiles.erb
cookbooks/web/recipes/rails.rb
cookbooks/web/resources/rails_port.rb
cookbooks/web/templates/default/apache.frontend.erb

index 281116f6a754bfee91982d3bbfb7a3eb9fc9019b..ac720a13f156aa0cd36f857075b3f22afa16e19b 100644 (file)
@@ -5,8 +5,8 @@ GEM
     bcrypt_pbkdf (1.0.1)
     builder (3.2.4)
     chef-utils (16.8.14)
-    cookstyle (7.4.0)
-      rubocop (= 1.6.1)
+    cookstyle (7.5.1)
+      rubocop (= 1.7.0)
     diff-lcs (1.4.4)
     docker-api (2.0.0)
       excon (>= 0.47.0)
@@ -50,12 +50,12 @@ GEM
     net-telnet (0.1.1)
     nori (2.6.0)
     parallel (1.20.1)
-    parser (2.7.2.0)
+    parser (3.0.0.0)
       ast (~> 2.4.1)
     pastel (0.8.0)
       tty-color (~> 0.5)
     rainbow (3.0.0)
-    regexp_parser (2.0.1)
+    regexp_parser (2.0.3)
     rexml (3.2.4)
     rspec (3.9.0)
       rspec-core (~> 3.9.0)
@@ -73,7 +73,7 @@ GEM
       diff-lcs (>= 1.2.0, < 2.0)
       rspec-support (~> 3.9.0)
     rspec-support (3.9.3)
-    rubocop (1.6.1)
+    rubocop (1.7.0)
       parallel (~> 1.10)
       parser (>= 2.7.1.5)
       rainbow (>= 2.2.2, < 4.0)
index 56ac172da1a60b9ec44a1d830bbe54bf5a17ef0e..bee7747abe4d3190a3ca033084cec4251c3cfc1b 100644 (file)
@@ -8,7 +8,7 @@ function createMap(divName) {
   var layers = L.control.layers(null, null, {collapsed:false}).addTo(map);
 
   // Add OpenStreetMap layer
-  layers.addBaseLayer(L.tileLayer("https://cdn-fastly-test.tile.openstreetmap.org/{z}/{x}/{y}.png", {
+  layers.addBaseLayer(L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
     attribution: "© <a target=\"_parent\" href=\"https://www.openstreetmap.org\">OpenStreetMap</a> and contributors, under an <a target=\"_parent\" href=\"https://www.openstreetmap.org/copyright\">open license</a>",
     maxZoom: 19
   }), "OpenStreetMap");
index 241b73a8e9283d6be225a88cbaf035bd067d35e9..154ce68fd50facaae76a71f654e78c0a265054f7 100644 (file)
@@ -86,6 +86,7 @@ systemd_service "renderd" do
   exec_start "/usr/bin/renderd -f"
   runtime_directory "renderd"
   standard_error "null"
+  limit_nofile 4096
   private_tmp true
   private_devices true
   private_network true
index eb108e95e7d0c13f25034c02d1bc4c0c535a30e4..721660bb16795b234bf5779c91e76b099578f11d 100644 (file)
@@ -20,7 +20,7 @@ my $tempfile = tmpnam();
 
 if (df($tiledir)->{per} > 88)
 {
-    system("find", $tiledir, "-xdev", "-name", "lost+found", "-prune", "-o", "-type", "f", "-name", "*.meta", "-atime", "+3", "-fprintf", $tempfile, "%A@ %p\n");
+    system("find", $tiledir, "-xdev", "-name", "lost+found", "-prune", "-o", "-type", "f", "-name", "*.meta", "-atime", "+2", "-fprintf", $tempfile, "%A@ %p\n");
 
     open(TILES, "-|", "sort", "-n", $tempfile) || die "Can't open $tempfile: $!";
 
index fd484263e5db0652de7bc45777bba4b4a6f0c0bd..caf20279f1dc8727a3847ccdfe0e245e6dd8ad1d 100644 (file)
@@ -113,7 +113,6 @@ 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
index 978dcb70fb952d4944e50dce69ed1473da68d839..90028e9f9833a272b12873b3bf4031443bf26a12 100644 (file)
@@ -448,6 +448,7 @@ action :create do
   file "#{rails_directory}/public/export/embed.html" do
     action :nothing
     subscribes :delete, "git[#{rails_directory}]"
+    subscribes :delete, "file[#{rails_directory}/config/settings.local.yml]"
   end
 
   passenger_application rails_directory do
index 9fbb7919d448862b244b677ddf87c8b7463fdba2..19854189b6b3d52d2b812bf743261b51c0611662 100644 (file)
   RedirectPermanent /images/cc_button.png https://www.openstreetmap.org/assets/cc_button.png
 
   #
-  # Redirect api requests made to www.osm.org to api.osm.org
+  # Redirect api requests made to www.openstreetmap.org to api.openstreetmap.org
   #
 #  RewriteCond %{HTTP_HOST} =www.openstreetmap.org
 #  RewriteRule ^/api/(.*)$ https://api.openstreetmap.org/api/$1 [L,NE,R=permanent]
 
   #
-  # Redirect non-api requests made to api.osm.org to www.osm.org
+  # Redirect non-api requests made to api.openstreetmap.org to www.openstreetmap.org
   #
   RewriteCond %{HTTP_HOST} =api.openstreetmap.org
   RewriteCond %{REQUEST_URI} !^/api/
   RedirectPermanent / https://www.openstreetmap.org/
 </VirtualHost>
 
+<VirtualHost *:80>
+  ServerName osm.org
+
+  Header always set Cache-Control "max-age=31536000"
+  Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
+
+  RewriteEngine on
+
+  RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
+
+  RewriteCond %{REQUEST_URI} !^/server-status$
+  RewriteRule ^(.*)$ https://osm.org$1 [L,NE,R=permanent]
+</VirtualHost>
+
+<VirtualHost *:80>
+  ServerName www.osm.org
+
+  Header always set Cache-Control "max-age=31536000"
+  Header always set Expires "Tue, 19 Jan 2038 03:14:07 GMT"
+
+  RewriteEngine on
+
+  RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L]
+
+  RewriteCond %{REQUEST_URI} !^/server-status$
+  RewriteRule ^(.*)$ https://www.osm.org$1 [L,NE,R=permanent]
+</VirtualHost>
+
 <VirtualHost *:80>
   ServerName openstreetmap.org