]> git.openstreetmap.org Git - chef.git/commitdiff
Add configuration for GPS trace storage
authorTom Hughes <tom@compton.nu>
Sun, 13 Feb 2022 18:01:27 +0000 (18:01 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 13 Feb 2022 18:35:56 +0000 (18:35 +0000)
cookbooks/web/recipes/rails.rb
cookbooks/web/resources/rails_port.rb

index 7bd00e0b9bb4956a6898abfb4aa287c28bdea93a..9f51581b4f7bfae1e8a6ea99268aa45c0490a52c 100644 (file)
@@ -66,6 +66,30 @@ storage = {
       "acl" => "public-read",
       "cache_control" => "public, max-age=31536000, immutable"
     }
+  },
+  "gps_traces" => {
+    "service" => "S3",
+    "access_key_id" => "AKIASQUXHPE7AMJQRFOS",
+    "secret_access_key" => web_passwords["aws_key"],
+    "region" => "eu-west-1",
+    "bucket" => "openstreetmap-gps-traces",
+    "use_dualstack_endpoint" => true,
+    "upload" => {
+      "acl" => "public-read",
+      "cache_control" => "public, max-age=31536000, immutable"
+    }
+  },
+  "gps_images" => {
+    "service" => "S3",
+    "access_key_id" => "AKIASQUXHPE7AMJQRFOS",
+    "secret_access_key" => web_passwords["aws_key"],
+    "region" => "eu-west-1",
+    "bucket" => "openstreetmap-gps-images",
+    "use_dualstack_endpoint" => true,
+    "upload" => {
+      "acl" => "public-read",
+      "cache_control" => "public, max-age=31536000, immutable"
+    }
   }
 }
 
@@ -114,6 +138,15 @@ rails_port "www.openstreetmap.org" do
   storage_configuration storage
   storage_service "avatars"
   storage_url "https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com"
+  avatar_storage "avatars"
+  trace_file_storage "gps_traces"
+  trace_image_storage "gps_images"
+  trace_icon_storage "gps_images"
+  storage_urls %w[
+    https://openstreetmap-user-avatars.s3.dualstack.eu-west-1.amazonaws.com
+    https://openstreetmap-gps-traces.s3.dualstack.eu-west-1.amazonaws.com
+    https://openstreetmap-gps-images.s3.dualstack.eu-west-1.amazonaws.com
+  ]
   overpass_url "https://query.openstreetmap.org/query-features"
 end
 
index fd1522204c482a574e1eca99df5093a490586a78..865114ccbf7f0ee26d19aa3df604a190b1e06b4a 100644 (file)
@@ -76,6 +76,11 @@ property :diary_feed_delay, Integer
 property :storage_configuration, Hash, :default => {}
 property :storage_service, String, :default => "local"
 property :storage_url, String
+property :avatar_storage, String
+property :trace_file_storage, String
+property :trace_image_storage, String
+property :trace_icon_storage, String
+property :storage_urls, Array
 property :tile_cdn_url, String
 
 action :create do
@@ -326,6 +331,11 @@ action :create do
     "diary_feed_delay",
     "storage_service",
     "storage_url",
+    "avatar_storage",
+    "trace_file_storage",
+    "trace_image_storage",
+    "trace_icon_storage",
+    "storage_urls",
     "tile_cdn_url"
   ).compact.merge(
     "server_protocol" => "https",