]> git.openstreetmap.org Git - chef.git/commitdiff
Enable cgimap with ratelimit-upload option for tomh dev site
authorTom Hughes <tom@compton.nu>
Sat, 4 Nov 2023 15:26:38 +0000 (15:26 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 4 Nov 2023 15:35:32 +0000 (15:35 +0000)
cookbooks/dev/recipes/default.rb
cookbooks/dev/templates/default/cgimap.environment.erb
roles/dev.rb

index 2afa12a09d972956b2dd794e9b324b2fb079e85f..7eed5a159c4e9d4878acc7a5634c855f91a013fa 100644 (file)
@@ -465,7 +465,8 @@ if node[:postgresql][:clusters][:"15/main"]
           variables :cgimap_port => cgimap_port,
                     :database_port => node[:postgresql][:clusters][:"15/main"][:port],
                     :database_name => database_name,
-                    :log_directory => log_directory
+                    :log_directory => log_directory,
+                    :options => details[:cgimap_options]
         end
 
         service "cgimap@#{name}" do
index 743599b527bba6edf8c7d4a379ef01a3e7ade6ad..1e592cc0cec13612a6d710948f0f41652581af09 100644 (file)
@@ -12,3 +12,6 @@ CGIMAP_MAP_AREA="<%= node[:web][:max_request_area] %>"
 CGIMAP_MAP_NODES"<%= node[:web][:max_number_of_nodes] %>"
 CGIMAP_MAX_WAY_NODES="<%= node[:web][:max_number_of_way_nodes] %>"
 CGIMAP_MAX_RELATION_MEMBERS="<%= node[:web][:max_number_of_relation_members] %>"
+<% Hash(@options).each do |name, value| -%>
+CGIMAP_<%= name.to_s.upcase %>="<%= value %>"
+<% end -%>
index 6a55e650d8857a42c1748398b842716fb037cf0d..3a838a35300839608587819c2d5bdb7ea9b0604d 100644 (file)
@@ -117,7 +117,12 @@ default_attributes(
       },
       :tomh => {
         :repository => "https://github.com/tomhughes/openstreetmap-website.git",
-        :revision => "next"
+        :revision => "next",
+        :cgimap_repository => "https://github.com/zerebubuth/openstreetmap-cgimap.git",
+        :cgimap_revision => "master",
+        :cgimap_options => {
+          :ratelimit_upload => true
+        }
       },
       :comments => {
         :repository => "https://github.com/ukasiu/openstreetmap-website.git",