X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/fa701fc119f67c4c7626ac07f2e081f249106305..f3d8422f1c3d8c1e8cf3cc04d9982b8cfb8878c4:/cookbooks/nominatim/recipes/version4.rb diff --git a/cookbooks/nominatim/recipes/version4.rb b/cookbooks/nominatim/recipes/version4.rb index e68be086e..7b218d951 100644 --- a/cookbooks/nominatim/recipes/version4.rb +++ b/cookbooks/nominatim/recipes/version4.rb @@ -64,6 +64,14 @@ postgis_version = node[:nominatim][:postgis] package "postgresql-#{postgresql_version}-postgis-#{postgis_version}" +node[:nominatim][:dbadmins].each do |user| + postgresql_user user do + cluster node[:nominatim][:dbcluster] + superuser true + only_if { node[:nominatim][:state] != "slave" } + end +end + postgresql_user "nominatim" do cluster node[:nominatim][:dbcluster] superuser true @@ -221,15 +229,15 @@ template "#{project_directory}/.env" do :tokenizer => node[:nominatim][:config][:tokenizer] end -#%w[wikimedia-importance.sql.gz gb_postcodes.csv.gz us_postcodes.csv.gz].each do |fname| -# remote_file "#{project_directory}/#{fname}" do -# action :create -# source "https://www.nominatim.org/data/#{fname}" -# owner "nominatim" -# group "nominatim" -# mode "644" -# end -#end +%w[wikimedia-importance.sql.gz gb_postcodes.csv.gz us_postcodes.csv.gz].each do |fname| + remote_file "#{project_directory}/#{fname}" do + action :create + source "https://www.nominatim.org/data/#{fname}" + owner "nominatim" + group "nominatim" + mode "644" + end +end # Webserver + frontend @@ -277,7 +285,7 @@ frontends = search(:node, "recipes:web\\:\\:frontend").sort_by(&:name) nginx_site "nominatim" do template "nginx.erb" - directory build_directory + directory project_directory variables :pools => node[:nominatim][:fpm_pools], :frontends => frontends, :confdir => "#{basedir}/etc",