From: Tom Hughes Date: Sun, 13 Feb 2022 18:01:27 +0000 (+0000) Subject: Add configuration for GPS trace storage X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/549833694d2c35ba99ac30edbecc4e96ecabb392 Add configuration for GPS trace storage --- diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 7bd00e0b9..9f51581b4 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -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 diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index fd1522204..865114ccb 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -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",