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"
## 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