]> git.openstreetmap.org Git - chef.git/commitdiff
community: Fix tests and workaround ohai issue on ARM Mac
authorGrant Slater <github@firefishy.com>
Fri, 2 Dec 2022 17:58:44 +0000 (17:58 +0000)
committerGrant Slater <github@firefishy.com>
Fri, 2 Dec 2022 17:59:45 +0000 (17:59 +0000)
cookbooks/community/metadata.rb
cookbooks/community/recipes/default.rb
cookbooks/community/templates/default/web_only.yml.erb

index 4d159c4ad600ded182bd7a24074758c09b343cd8..f2eaaaa03f4472c5ecd268b628e9a6f7d5f31807 100644 (file)
@@ -8,6 +8,7 @@ version           "1.0.0"
 supports          "ubuntu"
 depends           "accounts"
 depends           "docker"
+depends           "exim"
 depends           "geoipupdate"
 depends           "git"
 depends           "ssl"
index 89743de31c0fb7a7de419922633b6bd61b2ed693..f3888c61a43324edc29491c0409fc6bfc7a409fe 100644 (file)
 
 include_recipe "accounts"
 include_recipe "docker"
-include_recipe "geoipupdate"
 include_recipe "git"
 include_recipe "ssl"
 
 passwords = data_bag_item("community", "passwords")
 license_keys = data_bag_item("geoipupdate", "license-keys") unless kitchen?
 
+# Disable any default installed apache2 service. Web server is embedded within the discourse docker container
+service "apache2" do
+  action [:disable, :stop]
+end
+
 directory "/srv/community.openstreetmap.org" do
   owner "root"
   group "root"
index fbf8604d1d64d4497b01c2e67849ff78da67e421..f3f58bb6e59c369bc156e6d854d9ef68e686a3fa 100644 (file)
@@ -32,7 +32,7 @@ env:
 
   ## How many concurrent web requests are supported? Depends on memory and CPU cores.
   ## will be set automatically by bootstrap based on detected CPUs, or you can override
-  UNICORN_WORKERS: <%= node[:cpu][:total] %>
+  UNICORN_WORKERS: <%= [2, node.dig('cpu', 'total').to_i, node.dig('cpu', 'cores').to_i].max %>
 
   ## TODO: The domain name this Discourse instance will respond to
   DISCOURSE_HOSTNAME: community.openstreetmap.org